[Python-Dev] open(): set the default encoding to 'utf-8' in Python 3.3?

Tres Seaver tseaver at palladion.com
Wed Jun 29 00:29:16 CEST 2011


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 06/28/2011 12:52 PM, Bill Janssen wrote:
> M.-A. Lemburg <mal at egenix.com> wrote:
> 
>> How about a more radical change: have open() in Py3 default to
>> opening the file in binary mode, if no encoding is given (even
>> if the mode doesn't include 'b') ?
> 
> +1.
> 
>> That'll make it compatible to the Py2 world again and avoid
>> all the encoding guessing.
> 
> Yep.

+1 from me, as well:  "in the face of ambiguity, refuse the temptation
sto guess."


Tres.
- -- 
===================================================================
Tres Seaver          +1 540-429-0999          tseaver at palladion.com
Palladion Software   "Excellence by Design"    http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk4KVbwACgkQ+gerLs4ltQ4gPACgoWGjAhmOg9IGQgMht2KsZYn5
mKUAnjcLP6BGCVFSudm1v77ZHere3VHw
=4SPu
-----END PGP SIGNATURE-----



More information about the Python-Dev mailing list