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 martin.panter
Recipients fhaxbox66@googlemail.com, mark.dickinson, martin.panter
Date 2014-10-06.09:50:42
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1412589043.2.0.0440329602791.issue22563@psf.upfronthosting.co.za>
In-reply-to
Content
Perhaps Leo doesn’t understand that the name passed to “namedtuple” is just an indicator for debugging etc, and it doesn’t really have to be unique or even correspond with what it is assigned to. I do remember finding it a bit odd that I had to give it a name when I first used “namedtuple”, but I guess it is because all Python function and class objects store their name internally.

>>> AB = namedtuple("Whatever", ("a", "b"))
>>> AB
<class '__main__.Whatever'>
>>> Whatever
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'Whatever' is not defined
>>> Whatever = AB
>>> Whatever
<class '__main__.Whatever'>
History
Date User Action Args
2014-10-06 09:50:43martin.pantersetrecipients: + martin.panter, mark.dickinson, fhaxbox66@googlemail.com
2014-10-06 09:50:43martin.pantersetmessageid: <1412589043.2.0.0440329602791.issue22563@psf.upfronthosting.co.za>
2014-10-06 09:50:43martin.panterlinkissue22563 messages
2014-10-06 09:50:42martin.pantercreate