On Wed, Apr 6, 2016 at 8:16 PM George Trojan - NOAA Federal < george.tro...@noaa.gov> wrote:
> My basic question is how to document functions created by > functools.partial, such that the documentation can be viewed not only by > reading the code. Of course, as the last resort, I could create my own > implementation (i.e. copy the pure Python code). > I don't think this is a complete solution, but it might get you a bit closer. import functools import math def party(func, *args, **kwargs): d = {'__name__': func.__name__, '__doc__': func.__doc__,} partial = type('partial', (functools.partial,), d) foo = partial(func, *args, **kwargs) return foo exp = party(pow, math.e) help(exp) -- https://mail.python.org/mailman/listinfo/python-list