2022-06-06 10:54:30 +08:00

8 lines
225 B
Python

def copy(source):
"""Copy a docstring from another source function (if present)."""
def do_copy(target):
if source.__doc__:
target.__doc__ = source.__doc__
return target
return do_copy