Louie Lu added the comment:

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

----------
nosy: +louielu

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue20401>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to