Larry Hastings wrote:
inspect.getfullargspec is currently unable to introspect builtin
functions and methods. Should builtins gain a __signature__ so they
can be introspected?
If function signatures are useful, then they're useful, and the
implementation language for the function is irrelevant. I already sent
Yuri a patch adding __signature__ to PyCFunctionObject, which I thought
he merged but I don't see in his repo.
I would love to be able to inspect builtins for their signature. I have a
class decorator that needs to know the signature of the class constructor,
which unfortunately falls down for the simple cases of inheriting from a
builtin without a custom __init__ or __new__.
--
Steven
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com