[Python-ideas] Py3 unicode impositions

Chris Rebert pyideas at rebertia.com
Sun Feb 12 05:17:31 CET 2012


On Sat, Feb 11, 2012 at 7:19 PM, Carl M. Johnson
<cmjohnson.mailinglist at gmail.com> wrote:
> On Feb 11, 2012, at 5:10 PM, Eric Snow wrote:
>> So something like this:
>>
>>    import functools, builtins
>>    open = builtins.open = functools.partial(open, encoding="ascii",
>> errors="surrogateescape")
>
> We could pack it in and call it something like "python2open". :-)

Or just add a keyword-only argument to open():
americentric=True    :-P



More information about the Python-ideas mailing list