You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
reprlib.recursive_repr is not setting .__wrapped__ attribute #107409
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
Activity
gh-107409: set `__wrapped__` attribute in `reprlib.recursive_repr` (#…