Larry Hastings added the comment:

Attached is a patch supporting simple symbolic constants.  It works from 
beginning to end--you specify it in the Argument Clinic input and it shows up 
in the inspect.Signature and uses the constant in the generated C code.

One complication: when using one of these constants, I force you to specify a 
c_default.  Which is now automatically supported on all converters, as is 
py_default.

I converted pattern_match in _sre.c as a sample.  I won't check that part of 
the patch in; it's just to give you an idea of what it looks like for the user.

----------
Added file: 
http://bugs.python.org/file33333/larry.simple.symbolic.constant.default.values.diff.1.txt

_______________________________________
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