Larry Hastings added the comment:

"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)

----------

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

Reply via email to