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 Spencer Brown
Recipients AlexWaygood, Spencer Brown, emontnemery, gvanrossum, kj
Date 2021-12-03.08:58:36
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1638521916.75.0.199168284891.issue45972@roundup.psfhosted.org>
In-reply-to
Content
What's happening is that typing.NamedTuple ignores non-annotated attributes entirely when computing the names it passes along to namedtuple(), so here "a" is just a class attribute. You're accessing it from there, but the tuple itself is entirely empty. Perhaps it should error out if no names at all are found?
History
Date User Action Args
2021-12-03 08:58:36Spencer Brownsetrecipients: + Spencer Brown, gvanrossum, kj, AlexWaygood, emontnemery
2021-12-03 08:58:36Spencer Brownsetmessageid: <1638521916.75.0.199168284891.issue45972@roundup.psfhosted.org>
2021-12-03 08:58:36Spencer Brownlinkissue45972 messages
2021-12-03 08:58:36Spencer Browncreate