A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2007-February/071207.html below:

[Python-Dev] Py2.6 ideas

[Python-Dev] Py2.6 ideas [Python-Dev] Py2.6 ideasDelaney, Timothy (Tim) tdelaney at avaya.com
Fri Feb 16 00:12:09 CET 2007
Guido van Rossum wrote:

> On 2/15/07, Raymond Hettinger <raymond.hettinger at verizon.net> wrote:
>> * Add a pure python named_tuple class to the collections module. 
>> I've been using the class for about a year and found that it greatly
>> improves the usability of tuples as records.
>> http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/500261
> 
> Hm, but why would they still have to be tuples? Why not just have a
> generic 'record' class?

Hmm - possibilities. "record" definitely has greater connotations of
heterogeneous elements than "tuple", which would put paid to the
constant arguments that "a tuple is really just an immutable list".

list - primarily intended for homogeneous elements
record - primarily intended for heterogeneous elements, elements are
(optionally?) named

and have mutable and immutable versions of each. Maybe the current list
syntax would then continue to create a mutable list, and the current
tuple syntax would create an immutable record (with no element names)
i.e. the current tuple.

Tim Delaney
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4