[issue24145] Support |= for parameters in converters

Serhiy Storchaka report at bugs.python.org
Fri May 8 15:00:21 CEST 2015


Serhiy Storchaka added the comment:

For now str(accept={str, NoneType}) is used only 14 times in 6 files in 5 modules. The "z" format unit is used also in still not converted modules  _codecs (a lot of sites), _locale, mmap, _multiprocessing, and _socket. Current syntax doesn't look so ugly for me. I would wait until we converted more modules and implemented more converters that don't match existing format units.

Alternative syntax can be "str | NoneType" (without the accept parameter at all).

----------

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


More information about the Python-bugs-list mailing list