Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork34.1k
Closed
Description
Bug report
There is no way to get original actual__repr__ function after applying@recursive_repr decorator
importreprlibclassX:@reprlib.recursive_repr()def__repr__(self)->str:returnf'X({self.__dict__})'# how to get initial X.__repr__ back?# this doesn't work:X.__repr__.__wrapped__# AttributeError: 'function' object has no attribute '__wrapped__'# this is awful:X.__repr__.__closure__[2].cell_contents
Your environment
- CPython versions tested on: 3.11, 3.13.0a0