Serhiy Storchaka added the comment:
I think it is more common to use the general "O" format. In any case you need
to write separate code for None and str in the body of function.
--
nosy: +serhiy.storchaka
___
Python tracker
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