Suggestions for good programming practices?

David LeBlanc whisper at oz.net
Mon Jun 24 22:24:53 EDT 2002


Structs and tuples are different. They're both of the same general category
of aggregate data, but they are different as Brian notes.

It's like people: boys are people and girls are people, but if you try to
access a strange girl by position, you're apt to get your face smacked or
worse! ;-)

<tongue value='most firmly in cheek'/>

David LeBlanc
Seattle, WA USA

> -----Original Message-----
> From: python-list-admin at python.org
> [mailto:python-list-admin at python.org]On Behalf Of Brian Quinlan
> Sent: Monday, June 24, 2002 19:04
> To: 'Peter Hansen'; python-list at python.org
> Subject: RE: Suggestions for good programming practices?
>
>
> Peter Hansen wrote:
> > Brian Quinlan wrote:
> > >
> > > Peter Hansen wrote:
> > > > You _are_ returning them "in a struct".  It's spelled "tuple"
> > > > but other than that what's the difference?
> > >
> > > struct members are access by name while tuple elements are accessed
> > > positionally.
> >
> > Okay.  So why is that a problem?
>
> I'm not saying it is. I'm saying that tuples and structs are different.
>
> Cheers,
> Brian
>
>
>
> --
> http://mail.python.org/mailman/listinfo/python-list






More information about the Python-list mailing list