say I have the following code:
def func(x, y = 1, z = 2):
""" A comment about this function """
return x + y + z
another_func = partial(func, z = 4)
What would be the correct or Pythonic way of documenting the another_func function?
See partial() description on http://docs.python.org/library/functools.html#functools.partial
Like this:
another_func.__doc__ = "My documentation"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With