➜

This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

作者 louielu
收信人 louielu, terry.reedy, yselivanov
日期 2017-04-30.17:06:31
SpamBayes Score -1.0
Marked as misclassified 是
Message-id <1493571991.56.0.698568324255.issue19903@psf.upfronthosting.co.za>
In-reply-to
内容
I'm now testing to change getfullargspect to signature. It came out that signature can't accept bound method with only _VAR_KEYWORD. This test case will gave a ValueError:

    >>> class C:
        def m2(**kw):
            pass
    >>> c = C()
    >>> ip.signature(c.m2)
   Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.6/inspect.py", line 3002, in signature
    return Signature.from_callable(obj, follow_wrapped=follow_wrapped)
  File "/usr/lib/python3.6/inspect.py", line 2752, in from_callable
    follow_wrapper_chains=follow_wrapped)
  File "/usr/lib/python3.6/inspect.py", line 2169, in _signature_from_callable
    return _signature_bound_method(sig)
  File "/usr/lib/python3.6/inspect.py", line 1759, in _signature_bound_method
    raise ValueError('invalid method signature')
ValueError: invalid method signature
历史
日期 用户 动作 参数
2017-04-30 17:06:31louielu修改recipients: + louielu, terry.reedy, yselivanov
2017-04-30 17:06:31louielu修改messageid: <1493571991.56.0.698568324255.issue19903@psf.upfronthosting.co.za>
2017-04-30 17:06:31louielu链接issue19903 messages
2017-04-30 17:06:31louielu创建