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 Samuel Isaacson
Recipients Samuel Isaacson
Date 2015-08-24.23:49:47
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1440460188.11.0.136200791288.issue24931@psf.upfronthosting.co.za>
In-reply-to
Content
When inheriting from namedtuples, _asdict and __dict__ return empty dictionaries:

    from collections import namedtuple

    class Point(namedtuple('_Point', ['x', 'y'])):
        pass

    a = Point(3, 4)
    print(a._asdict() == {})

gives False; it is True on Python 2.7.6
History
Date User Action Args
2015-08-24 23:49:48Samuel Isaacsonsetrecipients: + Samuel Isaacson
2015-08-24 23:49:48Samuel Isaacsonsetmessageid: <1440460188.11.0.136200791288.issue24931@psf.upfronthosting.co.za>
2015-08-24 23:49:48Samuel Isaacsonlinkissue24931 messages
2015-08-24 23:49:47Samuel Isaacsoncreate