Chris Angelico <ros...@gmail.com>:

> The only thing that might be an issue is that you can't use open(fn)
> to read your files, but you have to explicitly state the encoding.
> That would be an understandable problem, especially for someone who
> develops on a single platform and forgets that the default differs. As
> long as you always explicitly say encoding="utf-8", and document that
> you do so, any problems are someone else's.

Yes. I don't like open() guessing the enconding:

   The default encoding is platform dependent (whatever
   locale.getpreferredencoding() returns)

Also, I don't like sys.std* guessing the encoding:

   Under other platforms, the locale encoding is used (see
   locale.getpreferredencoding()).

In each case, it would have been better to default to bytes just like
subprocess does.


Marko
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to