[issue20144] Argument Clinic doesn't support named constants as default values
Larry Hastings
report at bugs.python.org
Tue Jan 7 12:52:15 CET 2014
Larry Hastings added the comment:
Here's a second patch; I think this is ready to go in
I cleaned up the node parsing a lot. It now knows how to parse the following types of default values:
* Number (this applies to both ints and floats)
* String ('hello')
* Attribute (sys.maxsize)
* Named constant (None, True, False)
As long as I'm fixing this, I want to add support for any other values we're going to want. Did I miss any? Note that we can't really support container types, because initializing them on the C side isn't practical.
Also, the tests don't exercise all of the above possible node types, just because I couldn't remember builtins that used those types. We'll fill in the remaining tests as we port new functions to Argument Clinic.
If I can get a quick LGTM review, I'll check this in.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue20144>
_______________________________________
More information about the Python-bugs-list
mailing list