homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author jimjjewett
Recipients georg.brandl, jimjjewett
Date 2008年06月01日.23:12:14
SpamBayes Score 0.00016988437
Marked as misclassified No
Message-id <1212361944.88.0.914955463157.issue3025@psf.upfronthosting.co.za>
In-reply-to
Content
The str->Unicode change widened IDLE/batch discrepancy.
In python 2.x, bytes are printable.
>>> for i in range(256): print i, chr(i)
works fine. In python 3, chr has become (the old) unichr, and whether a 
unicode character is printable depends on the environment. In particular, 
under my Windows XP, the equivalent
>>> for i in range(256): print (i, chr(i))
will still work fine under IDLE, but will now crash with an 
UnicodeEncodeError when run from the command line.
----------------
Unfortunately, I'm not sure what the right solution actually is, other than 
a mention in the Whats New document. 
I believe the 2.5 code was using a system page to print those characters, as 
they often looked like letters rather than <control>. Copying that would 
probably be the wrong solution.
Limiting IDLE would add consistency, but might be a lot of work for the 
equivalent of a --pedantic flag.
PEP 3138 seems to be proposing a default stdout BackslashReplace, which may 
at least help.
History
Date User Action Args
2008年06月01日 23:12:30jimjjewettsetspambayes_score: 0.000169884 -> 0.00016988437
recipients: + jimjjewett, georg.brandl
2008年06月01日 23:12:25jimjjewettsetspambayes_score: 0.000169884 -> 0.000169884
messageid: <1212361944.88.0.914955463157.issue3025@psf.upfronthosting.co.za>
2008年06月01日 23:12:23jimjjewettlinkissue3025 messages
2008年06月01日 23:12:21jimjjewettcreate

AltStyle によって変換されたページ (->オリジナル) /