Eric Nieuwland wrote: > Neat! But please add something to the __doc__ so we can also see it was > changed. E.g. > self.__doc__ = other.__doc__ + os.linesep + "*** deprecated ***" Decorators that alter the signature, or wish to change the docstring can make their modifications after copying from the original (or simply not copy from the original in the first place). E.g: def deprecated(orig): def f(*args, **kwds): #Emit warning here return orig(*args, **kwds) f.update_meta(orig) f.__doc__ = "*** Deprecated *** " + f.__doc__ return f Any such changes are outside the purview of a metadata transfer method, though, since they're highly decorator dependent. Cheers, Nick. -- Nick Coghlan | ncoghlan at email.com | Brisbane, Australia --------------------------------------------------------------- http://boredomandlaziness.skystorm.net
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4