Message292637
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 |
|
Date |
User |
Action |
Args |
2017-04-30 17:11:33 | louielu | set | recipients:
+ louielu, terry.reedy, ncoghlan, larry, python-dev, yselivanov |
2017-04-30 17:11:33 | louielu | set | messageid: <1493572293.31.0.175007854103.issue20401@psf.upfronthosting.co.za> |
2017-04-30 17:11:33 | louielu | link | issue20401 messages |
2017-04-30 17:11:33 | louielu | create | |
|