Serhiy Storchaka added the comment: Indeed, keys of __dict__ are interned. But elements of _fields are not.
>>> A = namedtuple('A', 'abc123 def456') >>> sorted(A.__dict__)[-1] == A._fields[-1] True >>> sorted(A.__dict__)[-1] is A._fields[-1] False ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue25981> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com