On 15/02/2007 20.59, Raymond Hettinger 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

+1 from me too, I've been using a class with the same name and semantic 
(though an inferior implementation) for almost two years now, with great 
benefits.

As suggested in the cookbook comment, please consider changing the semantic of 
  the generated constructor so that it accepts a single iterable positional 
arguments (or keyword arguments). This matches tuple() (and other containers) 
in behaviour, and makes it easier to substitute existing uses with named tuples.
-- 
Giovanni Bajo

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to