| 5962 | class S(str): # Not interned |
| 5963 | pass |
| 5964 | class A: |
| 5965 | __slotnames__ = [S('spam')] |
| 5966 | def __getattr__(self, attr): |
| 5967 | if attr == 'spam': |
| 5968 | A.__slotnames__[:] = [S('spam')] |
| 5969 | return 42 |
| 5970 | else: |
| 5971 | raise AttributeError |
| 5972 | |
| 5973 | import copyreg |
| 5974 | expected = (copyreg.__newobj__, (A,), (None, {'spam': 42}), None, None) |