There was an error while loading. Please reload this page.
KeyError: '__name__'
A clear and concise description of what the bug is. Include a minimal, reproducible example (https://stackoverflow.com/help/minimal-reproducible-example), if possible.
Repo:
class MyConfig(dict): def __getattr__(self, x): return self[x] obj = MyConfig(offset=5) obj_weakref = weakref.ref(obj) str(obj_weakref) # raise error: KeyError: '__name__'
Error:
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "<stdin>", line 3, in __getattr__ KeyError: '__name__'
repr
weakref.ref