[issue32285] In `unicodedata`, it should be possible to check a unistr's normal form without necessarily copying it

STINNER Victor report at bugs.python.org
Tue Dec 12 08:10:46 EST 2017


STINNER Victor <victor.stinner at gmail.com> added the comment:

> However, I'm concerned by your comment that you fall back on creating a normalized copy and comparing.

The purpose of the function is to be faster than str == unicodedata.normalize(form, str). So yeah, any optimization is welcome.

But I don't bother with MAYBE suboptimal case which is implemented with: str == unicodedata.normalize(form, str). It can be optimized later, if needed.

If someone cares of performance, I will require a benchmark, since I only trust numbers :-)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32285>
_______________________________________


More information about the Python-bugs-list mailing list