[issue8415] namedtuple vs tuple
Raymond Hettinger
report at bugs.python.org
Fri Apr 16 07:40:31 CEST 2010
Raymond Hettinger <rhettinger at users.sourceforge.net> added the comment:
Sorry, this was by design. There were two possible constructors, one using positional arguments or keywords and one from an iterable. Either one could have been the main constructor. A number of use cases favored the one that we choose. It was a good decision, but not a perfect one.
To construct a namedtuple directly from an existing tuple, either use:
ntuple(*t)
or
ntuple._make(t)
The class is functioning as designed, documented, and tested. There is no way to change it without breaking most existing uses. Closing as rejected.
----------
assignee: -> rhettinger
resolution: -> rejected
status: open -> closed
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue8415>
_______________________________________
More information about the Python-bugs-list
mailing list