[Python-3000] Fwd: UPDATED: PEP 3138- String representation in Python 3000

Guido van Rossum guido at python.org
Sat May 31 22:09:49 CEST 2008


Great -- get ready to make your patch perfect!

On Sat, May 31, 2008 at 10:30 AM, Atsuo Ishimoto <ishimoto at gembook.org> wrote:
> Hi Guido,
>
> On Sun, Jun 1, 2008 at 1:32 AM, Guido van Rossum <guido at python.org> wrote:
>> Hi Atsuo,
>>
>> I'm very close to accepting your PEP. I have a few questions:
>
> Great!
>
>>
>> - The Rationale has a more elaborate (and perhaps slightly
>> conflicting, regarding the status of ASCII space?) definition of our
>> definition of non-printable than the Specification. Perhaps this could
>> be merged?
>>
>
> Yes, I'll merge them.
>
>> - I'm still not comfortable with making stdout default to
>> backslashreplace. Stuff written to stdout might be consumed by another
>> program that might misinterpret the \ escapes. Previously I thought I
>> was okay with doing this only if stdout.isatty() returns True, but I
>> think that would just add confusion of the kind "it works in
>> interactive mode but not when redirecting to a file".  I'm okay with
>> apps who think they need this setting that explicitly, but not to
>> having it be the default. (For stderr however I agree that
>> backslashreplace is the right default.)
>
> Okay, we'll keep 'strict' as default error handler for stdout always,
> then. I can live with it.
> But, my $0.02, I expect this issue will be revisited after people
> start to develop real applications with Python 3.x.
>
>>
>> - What happens to Unicode characters that are "unassigned"? I assume
>> there are many of those, especially outside the basic plane. Shouldn't
>> we be conservative and convert these to \u or \U escapes as well?
>>
>
> Unassigned characters are defined as 'Cn ' in the Unicode database and
> they will be escaped.
>
> I'll update the PEP and the patch on Sunday. Thank you!
>



-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)


More information about the Python-3000 mailing list