Trying to understand this moji-bake

Chris Angelico rosuav at gmail.com
Sat Jan 25 14:13:49 EST 2014


On Sun, Jan 26, 2014 at 4:56 AM, Peter Pearson <ppearson at nowhere.invalid> wrote:
> $ python2.7 -c "import sys; print(sys.stdin.encoding)"
> UTF-8

This isn't from stdin, though, it's about the interpretation of the
bytes of source code without a magic cookie.

According to PEP 263 [1], the default encoding should have become
"ascii" as of Python 2.5. That's what puzzles me.

ChrisA

[1] http://www.python.org/dev/peps/pep-0263/



More information about the Python-list mailing list