[Python-Dev] Support byte string API of Windows in Python3?

"Martin v. Löwis" martin at v.loewis.de
Mon Apr 19 22:53:36 CEST 2010


Antoine Pitrou wrote:
> Victor Stinner <victor.stinner <at> haypocalc.com> writes:
>> It's a choice, I didn't want to patch Windows because I know that Windows use 
>> unicode internally. I consider that developers using Python3 should use 
>> unicode on Windows, and byte or unicode+surrogates on other OS.
> 
> I think both possibilities should be available on all OSes, so as to make it
> easier to write cross-platform code. Having to switch being bytes and unicode
> depending on the OS means developers will have to deal with encoding issues
> themselves, which is suboptimal from a language usability's point of view.

Indeed, you shouldn't be switching. Instead, you should be using Unicode
strings all the time.

Regards,
Martin


More information about the Python-Dev mailing list