Message207453
"sys.maxsize" won't work. inspect.Signature parses the __text_signature__ using ast.parse, and it only recognizes constant values and named constants (True/False/None) for the default value for parameters. Playing with ast, it looks like we'd have to support a tree of Attribute nodes, then look up sys (or whatever) and recursively getattr on it. Which would be new code.
Anyway it seems like a bad idea:
import inspect
import re
import sys
sys.maxsize = 3
inspect.signature(re.compile(".*").match) |
|
Date |
User |
Action |
Args |
2014-01-06 16:38:52 | larry | set | recipients:
+ larry, serhiy.storchaka |
2014-01-06 16:38:52 | larry | set | messageid: <1389026332.15.0.981213690679.issue20144@psf.upfronthosting.co.za> |
2014-01-06 16:38:52 | larry | link | issue20144 messages |
2014-01-06 16:38:51 | larry | create | |
|