[issue37751] In codecs, function 'normalizestring' should convert both spaces and hyphens to underscores.
Inada Naoki
report at bugs.python.org
Fri Apr 23 01:47:33 EDT 2021
Inada Naoki <songofacandy at gmail.com> added the comment:
I think it is too late. Python 3.9 has been released already. Reverting the change is also breaking change.
PEP 100 says:
"Search functions are expected to take one argument, the encoding name in all lower case letters and with hyphens and spaces converted to underscores"
https://www.python.org/dev/peps/pep-0100/#codecs-coder-decoders-lookup
But codecs.register() says:
"Search functions are expected to take one argument, being the encoding name in all lower case letters".
I don't know historical reason why two document are inconsistent.
https://docs.python.org/3/library/codecs.html#codecs.register
----------
nosy: +methane
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37751>
_______________________________________
More information about the Python-bugs-list
mailing list