New submission from Inada Naoki <>:

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 

components: C API
messages: 372670
nosy: inada.naoki
priority: normal
severity: normal
status: open
title: Add new formats to PyArg_ParseTuple for "str or None"
versions: Python 3.10

Python tracker <>
Python-bugs-list mailing list

Reply via email to