On 7/31/07, Robert Kern <[EMAIL PROTECTED]> wrote: > Sebastian Haase wrote: > > On 7/31/07, Robert Kern <[EMAIL PROTECTED]> wrote: > >> Ryan Krauss wrote: > >>> I just tend to think in terms of lists rather than tuples. Why is a > >>> tuple a more reasonable choice than a list? (I'm really asking and > >>> not being argumentative, since you can't hear my tone.) > >> The key thing is that the type of the container of records is different > >> from the > >> type of the record, so you'd either have to have a list of tuples (or a > >> list of > >> lists of ... tuples) or a tuple of lists. There is a tendency to use lists > >> for > >> homogeneous collections and tuples for inhomogeneous collections; Guido > >> says > >> that this is the main difference in how he uses tuples and lists. When you > >> get > >> an answer to a DB-API2 SQL query, you get a list of (usually augmented) > >> tuples. > >> > > This is the best explanation I have heard about this yet. > > Where does he say this ? Just for reference .... > > http://mail.python.org/pipermail/python-dev/2003-March/033964.html >
Thanks, apparently this still hasn't made it into the Python Style Guid though: http://www.python.org/dev/peps/pep-0008/ Refer also: [Python-Dev] Tuples vs lists Aahz [EMAIL PROTECTED] 12 Mar 2003 http://mail.python.org/pipermail/python-dev/2003-March/033981.html [Python-Dev] Christian Tismer [EMAIL PROTECTED] 12 Mar 2003 http://mail.python.org/pipermail/python-dev/2003-March/033966.html he says: """I never realized this, and I'm a bit stunned. (but by no means negative about it, just surprized)""" Cheers, Sebastian _______________________________________________ Numpy-discussion mailing list [email protected] http://projects.scipy.org/mailman/listinfo/numpy-discussion
