Closed benoitbryon closed 9 years ago
Given the following decorator "identity":
>>> import decorum >>> @decorum.decorator ... class identity(object): ... """Noop decorator: does nothing!"""
And the following decorated function "my_function":
>>> @identity(assigned=None) ... def my_function(): ... """My function's docstring."""
At the moment, README tells decorator's name and doc are empty...
>>> my_function.__name__ is None True >>> my_function.__doc__ is None True
What about changing this behaviour to keep original name and documentation of decorator?
>>> my_function.__name__ identity >>> my_function.__doc__ Noop decorator: does nothing!
Yeah, that would be expected behavior I think.
Given the following decorator "identity":
And the following decorated function "my_function":
At the moment, README tells decorator's name and doc are empty...
What about changing this behaviour to keep original name and documentation of decorator?