On Fri, Sep 25, 2015 at 8:19 AM, Ian Kelly <ian.g.ke...@gmail.com> wrote: > Quick and dirty example: > > py> from inspect import Signature, Parameter > py> def foo(*args, **kwargs): pass > ... > py> foo.__signature__ = Signature([Parameter('x', > Parameter.POSITIONAL_OR_KEYWORD), Parameter('y', > Parameter.KEYWORD_ONLY)]) > py> help(foo) > Help on function foo in module __main__: > > foo(x, *, y)
Okay, that's a LOT easier than the stuff I was playing around with :) Of course, it still requires that inspect.signature be used. ChrisA -- https://mail.python.org/mailman/listinfo/python-list