This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author rhettinger
Recipients Isaac Morland, ethan.furman, methane, r.david.murray, rhettinger, steven.daprano
Date 2017-08-02.05:12:43
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
[R David Murray]
> So I vote -0.5.

Put me down for a full -1:

* This would be a potentially  confusing addition to the API.

* It may also encourage bad practices that we don't want to see in real code. 

* We want to be able to search for the namedtuple definition, want to have a meaningful repr, and want pickling to be easy.

* This doesn't have to be shoe-horned into the namedtuple API.  If an actual need did arise, it is trivial to write a wrapper that specifies whatever auto-naming logic happens to make sense for a particular application:

    >>> from collections import namedtuple
    >>> def auto_namedtuple(*attrnames, **kwargs):
            typename = '_'.join(attrnames)
            return namedtuple(typename, attrnames, **kwargs)

    >>> NT = auto_namedtuple('name', 'rank', 'serial')
    >>> print(NT.__doc__)
    name_rank_serial(name, rank, serial)
Date User Action Args
2017-08-02 05:12:44rhettingersetrecipients: + rhettinger, steven.daprano, r.david.murray, methane, ethan.furman, Isaac Morland
2017-08-02 05:12:44rhettingersetmessageid: <>
2017-08-02 05:12:44rhettingerlinkissue31085 messages
2017-08-02 05:12:44rhettingercreate