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 paul.moore
Recipients docs@python, paul.moore
Date 2016-04-19.12:25:44
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1461068744.46.0.957777609901.issue26805@psf.upfronthosting.co.za>
In-reply-to
Content
People often look towards collections.namedtuple when all they actually want is "named attribute" access to a collection of values, without needing a tuple subclass, or positional access. In these cases, types.SimpleNamespace may be a better fit.

I suggest adding the following pointer to the top of the namedtuple documentation:

"""
For simple uses, where the only requirement is to be able to refer to a set of values by name using attribute-style access, the :ref:`types.SimpleNamespace` type may be a suitable alternative to using a namedtuple.
"""
History
Date User Action Args
2016-04-19 12:25:44paul.mooresetrecipients: + paul.moore, docs@python
2016-04-19 12:25:44paul.mooresetmessageid: <1461068744.46.0.957777609901.issue26805@psf.upfronthosting.co.za>
2016-04-19 12:25:44paul.moorelinkissue26805 messages
2016-04-19 12:25:44paul.moorecreate