[New-bugs-announce] [issue41167] Add new formats to PyArg_ParseTuple for "str or None"
report at bugs.python.org
Tue Jun 30 05:03:42 EDT 2020
New submission from Inada Naoki <songofacandy at gmail.com>:
PyArg_ParseTuple has 'U' format for getting Unicode as PyObject*.
But when user want accept "str or None", they are forced to use 'O&' and write a custom converter. It is not convenient.
I am proposing to add 'U?' for "str or None" variants of 'U'. Does it make sense?
components: C API
title: Add new formats to PyArg_ParseTuple for "str or None"
versions: Python 3.10
Python tracker <report at bugs.python.org>
More information about the New-bugs-announce