Cake Xu <smallbigc...@qq.com> added the comment:

Thank Eryk for answering my question.

So I get it now. I use this in Linux.

If my understanding is right, the open() will invoke 
locale.getpreferredencoding() by setting the do_setlocale=False -- i.e. 
locale.getpreferredencoding(False) -- to avoid invoking setlocale(LC_CTYPE, "").

Previously I had thought it's locale.getpreferredencoding(True) that invoked.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue43140>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to