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