New submission from Paul Moore: 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. """ ---------- assignee: docs@python components: Documentation messages: 263733 nosy: docs@python, paul.moore priority: normal severity: normal status: open title: Refer to types.SimpleNamespace in namedtuple documentation type: enhancement versions: Python 3.6 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26805> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com