Message292637
| Author |
louielu |
| Recipients |
larry, louielu, ncoghlan, python-dev, terry.reedy, yselivanov |
| Date |
2017年04月30日.17:11:33 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1493572293.31.0.175007854103.issue20401@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Is there any reason that the second case Terry provide still will failed with ValueError?
class C:
def meth2(**kwds): pass
ip.signature(C().meth2)
Traceback (most recent call last):
File "/home/linux/Python/cpython/Lib/idlelib/idle_test/test_calltips.py", line 139, in test_starred_parameter
self.assertEqual(signature(meth), mtip)
File "/home/linux/Python/cpython/Lib/idlelib/calltips.py", line 149, in get_argspec
argspec = str(inspect.signature(fob))
File "/home/linux/Python/cpython/Lib/inspect.py", line 3028, in signature
return Signature.from_callable(obj, follow_wrapped=follow_wrapped)
File "/home/linux/Python/cpython/Lib/inspect.py", line 2778, in from_callable
follow_wrapper_chains=follow_wrapped)
File "/home/linux/Python/cpython/Lib/inspect.py", line 2195, in _signature_from_callable
return _signature_bound_method(sig)
File "/home/linux/Python/cpython/Lib/inspect.py", line 1785, in _signature_bound_method
raise ValueError('invalid method signature')
ValueError: invalid method signature |
|