Suggestions for good programming practices?
whisper at oz.net
Tue Jun 25 04:24:53 CEST 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
<tongue value='most firmly in cheek'/>
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.
More information about the Python-list