[Python-ideas] RFC: PEP 540 version 3 (Add a new UTF-8 mode)
Victor Stinner
victor.stinner at gmail.com
Thu Jan 12 10:29:41 EST 2017
2017-01-12 9:45 GMT+01:00 INADA Naoki <songofacandy at gmail.com>:
> As I described in other thread, LC_COLLATE may cause unintentional performance
> regression and behavior changes.
Since Python 3 uses mostly text, not bytes, LC_COLLATE should not
really impact Python applications. Locales set by setlocale() are not
inherited by child processes.
At least, I understand that setting the locale in Python doesn't
impact the performance of child processes:
--
import locale, subprocess
locale.setlocale(locale.LC_COLLATE, "fr_FR.UTF-8")
subprocess.call("sort long_text.txt > /dev/null", shell=True)
--
But the LC_COLLATE locale can be used by C libraries called from
Python through Python extensions implemented in C.
Victor
More information about the Python-ideas
mailing list