`__set_name__` hook manually added to `functools.wraps()` descriptor instance never called
`__set_name__` hook manually added to `functools.wraps()` descriptor instance never called Question: I’m trying to add a __set_name__ hook to the descriptor produced by functools.wraps inside a decorator, but it is never called and I don’t see any error messages: import functools def wrap(fn): """Decorator.""" @functools.wraps(fn) def w(*args, **kwargs): return fn(*args, **kwargs) # This never gets …