Message208502
Boy was I surprised by this:
>>> class C: pass
...
>>> import inspect
>>> inspect.signature(C)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/larry/src/python/clinic_c_types_hacking/Lib/inspect.py", line 1557, in signature
raise ValueError('callable {!r} is not supported by signature'.format(obj))
ValueError: callable <class '__main__.C'> is not supported by signature
Why not? C is a callable object. If you can't find a __new__ or an __init__ in the class, its signature should be pretty predictable.
(It returns a signature if you add either a __new__, an __init__, or both.) |
|
Date |
User |
Action |
Args |
2014-01-19 21:52:39 | larry | set | recipients:
+ larry, brett.cannon, ncoghlan, yselivanov |
2014-01-19 21:52:39 | larry | set | messageid: <1390168359.82.0.306015564457.issue20308@psf.upfronthosting.co.za> |
2014-01-19 21:52:39 | larry | link | issue20308 messages |
2014-01-19 21:52:39 | larry | create | |
|