Terry Reedy <tjre...@udel.edu> wrote:

> Initializaing a namedtuple from an iterable is unusual, and 
> hence gets the longer syntax. I

I quick look through our codebase agrees with that.  I found 27 
namedtuple classes.  21 were initialized with MyTuple(x, y, z) syntax.  
Three used MyTuple(*data).

Most interesting were the three that used MyTuple(**data).  In all three 
cases, data was a dictionary returned by re.match.groupdict().  The 
definition of the namedtuple was even built by introspecting the regex 
to find all the named groups!
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to