Good style for multi-valued returns

Rob W. W. Hooft rob at
Tue Apr 25 12:23:53 CEST 2000

>>>>> "CL" == Cameron Laird <claird at> writes:

 CL> Let me guess: folks generally pass tuples for small and
 CL> determinate-in-number multi-values, and dictionaries other- wise,
 CL> 'cept some do it all with tuples.  Accurate?

I sometimes use:

class Record:
    """Empty class for misc use"""
    def __init__(self,**kw):
        for key,value in kw.items():

    def __repr__(self):
        for i in dir(self):
            if i[0]!="_":
                if self._format.has_key(i):
                    if self._format[i]:
        import string
        return "Record: "+string.join(t)

    def copy(self):
        import copy
        return copy.copy(self)

=====   rob at  =====
=====   R&D, Nonius BV, Delft             =====
===== PGPid 0xFA19277D ========================== Use Linux! =========

More information about the Python-list mailing list