◐ Shell
clean mode source ↗

Message 129253 - Python tracker

Alexander Belopolsky wrote:
> 
> Alexander Belopolsky <belopolsky@users.sourceforge.net> added the comment:
> 
> In issue11303.diff, I add similar optimization for encode('latin1') and for 'utf8' variant of utf-8.  I don't think dash-less variants of utf-16 and utf-32 are common enough to justify special-casing.

Looks good.

Given that we are starting to have a whole set of such aliases
in the C code, I wonder whether it would be better to make the
string comparisons more efficient, e.g.
if "utf" matches, the checks could then continue with "8" or "-8"
instead of trying to match "utf" again and again.