[New-bugs-announce] [issue24037] Argument Clinic: add the boolint converter

Serhiy Storchaka report at bugs.python.org
Thu Apr 23 12:33:08 CEST 2015


New submission from Serhiy Storchaka:

The 'i' format unit is often used for semantically boolean values. When the parameter has a default value, in Argument clinic you should specify it twice, as Python and C values:

    closefd: int(c_default="1") = True

or

    keepends: int(py_default="False") = 0

Proposed patch adds the boolint converter which makes a conversion for you.

    closefd: boolint = True
    keepends: boolint = False

----------
components: Argument Clinic
files: clinic_boolint_converter.patch
keywords: patch
messages: 241860
nosy: larry, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Argument Clinic: add the boolint converter
type: enhancement
versions: Python 3.5
Added file: http://bugs.python.org/file39183/clinic_boolint_converter.patch

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


More information about the New-bugs-announce mailing list