MCPcopy Index your code
hub / github.com/python/cpython / A

Class A

Lib/test/test_descr.py:5964–5971  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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)

Callers

nothing calls this directly

Calls 1

SClass · 0.70

Tested by

no test coverage detected