[Python-3000] Displaying strings containing unicode escapes at the interactive prompt
Nick Coghlan
ncoghlan at gmail.com
Thu Apr 17 14:23:34 CEST 2008
Guido van Rossum wrote:
> On Wed, Apr 16, 2008 at 10:20 PM, Greg Ewing
> <greg.ewing at canterbury.ac.nz> wrote:
>> Alex Martelli wrote:
>> > I disagree: I always recommend using %r to display (in an error
>> > message, log entry, etc), a string that may be in error,
>>
>> For debugging messages, yes, but not output produced
>> in the normal course of operation. And "File Not Found"
>> I consider to be in the latter category -- the user
>> typed in the wrong file name, but it's still a string,
>> and should be displayed to him as such.
>
> I respectfully disagree. Control characters and such in the string
> should *definitely* be escaped. Regarding printable characters outside
> the ASCII range, see my post in another thread (which somehow nearly
> everybody appears to have missed);
Sorry, it got a "Usenet nod" from me after my efforts at working around
the problem on the display side proved futile (anyone know how to delete
an ASPN cookbook recipe that you've realised is fundamentally broken and
is never going to work?).
Cheers,
Nick.
--
Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia
---------------------------------------------------------------
http://www.boredomandlaziness.org
More information about the Python-3000
mailing list