Message209378
| Author |
terry.reedy |
| Recipients |
terry.reedy, yselivanov |
| Date |
2014年01月27日.02:16:32 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1390788993.17.0.660022728639.issue20401@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
>>> import inspect
>>> class C:
def meth(*args): pass
>>> str(inspect.signature(C.meth))
'(*args)'
>>> c=C()
>>> str(s=inspect.signature(c.meth))
'()'
*args should have been left in even for the bound method, as idlelib calltips do.
Since '*' is not a word character,
idlelib.Calltips._first_param = re.compile('(?<=\()\w*,円?\s*')
does not see '*args' as a substring to be deleted with
argspec = _first_param.sub("", argspec)
The same comment applies to
def meth2(**kwds): pass
even though calling the bound method would fail. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2014年01月27日 02:16:33 | terry.reedy | set | recipients:
+ terry.reedy, yselivanov |
| 2014年01月27日 02:16:33 | terry.reedy | set | messageid: <1390788993.17.0.660022728639.issue20401@psf.upfronthosting.co.za> |
| 2014年01月27日 02:16:33 | terry.reedy | link | issue20401 messages |
| 2014年01月27日 02:16:32 | terry.reedy | create |
|