Python 3.1.1 bytes decode with replace bug
Terry Reedy
tjreedy at udel.edu
Sat Oct 24 18:55:59 EDT 2009
Joe wrote:
> Thanks for your response.
>
>> Please provide more information
>>
>>> The Python 3.1.1 documentation has the following example:
>> Where? I could not find them
>
> http://docs.python.org/3.1/howto/unicode.html#unicode-howto
>
> Scroll down the page about half way to the "The String Type" section.
>
> The example was copied from the second example with the light green
> background.
>
>> Which interpreter and system? With Python 3.1 (r31:73574, Jun 26 2009,
>
> Python 3.1.1 (r311:74483, Aug 17 2009, 16:45:59) [MSC v.1500 64 bit
> (AMD64)] on win32
>
> Windows 7 x64 RTM, Python 3.1.1
For the reason BK explained, the important difference is that I ran in
the IDLE shell, which handles screen printing of unicode better ;-)
The important lesson for debugging, which I forgot also in my response,
is to separate creation of a (unicode) string from the printing of such.
You are not the first to get caught on this.
IE,
>>>s = <expression>
>>>print(s)
>> Do you do a search in the issues list at bugs.python.org?
>
> Yes, I did not see anything that seemed to apply.
tjr
More information about the Python-list
mailing list