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 elazar
Recipients elazar, gvanrossum, rhettinger
Date 2017-01-24.07:14:53
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1485242094.09.0.593682639878.issue29357@psf.upfronthosting.co.za>
In-reply-to
Content
The following does not work as expected:
```
from typing import NamedTuple

class A(NamedTuple):
    a: int

    def __repr__(self):
        return 'some A'

    def spam(self):
        print('spam!')

>>> a = A(5)
>>> repr(a)  # should be 'some A'
'A(a=5)'
>>> a.spam()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'A' object has no attribute 'spam'
```
History
Date User Action Args
2017-01-24 07:14:54elazarsetrecipients: + elazar, gvanrossum, rhettinger
2017-01-24 07:14:54elazarsetmessageid: <1485242094.09.0.593682639878.issue29357@psf.upfronthosting.co.za>
2017-01-24 07:14:53elazarlinkissue29357 messages
2017-01-24 07:14:53elazarcreate