Message292985
Thing just getting weird. If we remove the guard, some of the builtin function will get not-so-good signature result:
>>> i.signature(range.__init__)
<Signature (self, /, *args, **kwargs)>
>>> i.signature(list.append)
<Signature (self, object, /)>
>>> i.signature([].append)
<Signature (object, /)>
You can check my latest commit, The most big change is about __method__, it will make some different behavior:
str(i.signature(list.__new__)) -> (*args, **kwargs)
str(i.signature(p.sub)) -> (repl, string, count=0)
both of them are BuiltinFunctionType, and the first one in old version will be guard, so the get_argspec result will be docstring, we can't different them in non-guard version. |
|
Date |
User |
Action |
Args |
2017-05-04 14:57:19 | louielu | set | recipients:
+ louielu, terry.reedy, serhiy.storchaka, yselivanov |
2017-05-04 14:57:19 | louielu | set | messageid: <1493909839.64.0.162539081292.issue19903@psf.upfronthosting.co.za> |
2017-05-04 14:57:19 | louielu | link | issue19903 messages |
2017-05-04 14:57:19 | louielu | create | |
|