[issue17481] inspect.getfullargspec should use __signature__

Yury Selivanov report at bugs.python.org
Mon Jan 20 17:02:06 CET 2014


Yury Selivanov added the comment:

> Instead of keeping the check, we could just unconditionally convert exceptions from the signature call to a TypeError in order to maintain compatibility with the old external behaviour.

Agreed. See the new patch (getargsspec_02.patch)

Unfortunately, we have to keep the old 'ismethod' check in place for backwards compatibility purposes.

Larry,

The attached patch contains one failing unit-test: 'inspect.signature' returns 'None' for '_testapi.docstring_no_signature'. It should instead raise a ValueError.

----------
Added file: http://bugs.python.org/file33565/getargsspec_02.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue17481>
_______________________________________


More information about the Python-bugs-list mailing list