Author levkivskyi
Recipients elazar, gvanrossum, levkivskyi, rhettinger
Date 2017-01-24.08:41:54
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
This has been already reported in and fixed in and

Now adding new methods works but overwriting existing special attributes raises AttributeError:

class A(NamedTuple):
    x: int
    def spam(self):  # this works
    def _fields(self):  # this is an error (and also for __repr__ etc)

If you think that overwriting all special attributes should be allowed (or only some of them) then we could discuss this at python/typing tracker.
Date User Action Args
2017-01-24 08:41:54levkivskyisetrecipients: + levkivskyi, gvanrossum, rhettinger, elazar
2017-01-24 08:41:54levkivskyisetmessageid: <>
2017-01-24 08:41:54levkivskyilinkissue29357 messages
2017-01-24 08:41:54levkivskyicreate