Message208135
The attached patch extends Argument Clinic and the inspect module: now you may use simple (!) expressions as default values. So for example "sys.maxsize - 1" should now work fine.
* Names may be in the current module; as a backup they will also be looked up in sys.modules.
* You may look up attributes of names.
* You may subscript into names.
* You may use math operators, both unary and binary.
* int/float/string literals are (still) fine.
* You may not use: function calls, list/set/dict/tuple/bytes literals, generator expressions or comprehensions, if expressions, anything fun.
Other changes in this diff:
* "doc_default" is gone, it no longer makes sense.
* "py_default" and "c_default" handling is simpler and more predictable.
* Minor doc fix suggested on tracker.
The docs still need work. More tests would be good too but I'm already overwhelmed by work--could one of you guys contribute some tests? |
|
Date |
User |
Action |
Args |
2014-01-15 03:40:44 | larry | set | recipients:
+ larry, georg.brandl, serhiy.storchaka |
2014-01-15 03:40:43 | larry | set | messageid: <1389757243.15.0.949282322723.issue20226@psf.upfronthosting.co.za> |
2014-01-15 03:40:43 | larry | link | issue20226 messages |
2014-01-15 03:40:42 | larry | create | |
|