On Jan 06, 2017, at 11:08 PM, Steve Dower wrote: >Passing universal_newlines will use whatever locale.getdefaultencoding()
There is no locale.getdefaultencoding(); I think you mean locale.getpreferredencoding(False). (See the "Changed in version 3.3" note in $17.5.1.1 of the stdlib docs.) >universal_newlines may become a bad choice if the default encoding no longer >matches what the environment says, and personally, I wouldn't lose much sleep >over that. universal_newlines is also problematic because it's misnamed from the more common motivation to use it. Very often people do want to open std* in text mode (and thus trade in Unicodes), but they rarely equate that to "universal newlines". So the option is just more hidden magical side-effect and cargo-culted lore. It's certainly *useful* though, and I think we want to be sure that we don't break existing code that uses it for this purpose. Cheers, -Barry
pgp0FauJl68GN.pgp
Description: OpenPGP digital signature
_______________________________________________ Python-ideas mailing list [email protected] https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/
