[issue20144] Argument Clinic doesn't support named constants as default values

Serhiy Storchaka report at bugs.python.org
Mon Jan 6 17:18:52 CET 2014


Serhiy Storchaka added the comment:

Not always default value can be expressed in Python. Current docstring for the match() method says "match(string[, pos[, endpos]])". For this particular case it can be written as "match(string, pos=0, endpos=sys.maxsize)". And this is very common case (see also str.find(sub[, start[, end]]), etc). Perhaps there are cases in which the default value is not PY_SSIZE_T_MAX and None is not accepted (as for dir_fd parameter in os functions).

So as minimum Argument Clinic can support sys.maxsize, and as maximum, it should support arbitrary values.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue20144>
_______________________________________


More information about the Python-bugs-list mailing list