[New-bugs-announce] [issue20282] Argument Clinic: int with boolean default
Serhiy Storchaka
report at bugs.python.org
Thu Jan 16 21:18:38 CET 2014
New submission from Serhiy Storchaka:
Currently in many functions boolean argument parsed as int, with 'i' code. When converting this to Argument Clinic we can't write just
interactive: int = False
because C default becomes "Py_False".
Instead we need explicitly specify c_default.
interactive: int(c_default="0") = False
It would be good if True/False default values be converted to 1/0 C default values for the int type.
I think this is enough common situation.
----------
components: Demos and Tools
messages: 208304
nosy: georg.brandl, larry, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Argument Clinic: int with boolean default
type: enhancement
versions: Python 3.4
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue20282>
_______________________________________
More information about the New-bugs-announce
mailing list