This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author larry
Recipients larry, serhiy.storchaka
Date 2014-01-06.16:38:51
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1389026332.15.0.981213690679.issue20144@psf.upfronthosting.co.za>
In-reply-to
Content
"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)
History
Date User Action Args
2014-01-06 16:38:52larrysetrecipients: + larry, serhiy.storchaka
2014-01-06 16:38:52larrysetmessageid: <1389026332.15.0.981213690679.issue20144@psf.upfronthosting.co.za>
2014-01-06 16:38:52larrylinkissue20144 messages
2014-01-06 16:38:51larrycreate