R. David Murray <rdmur...@bitdance.com> added the comment: rdmurray>python2.6 py27-str-unicode-bytes.py type(b)=<type 'str'> Traceback (most recent call last): File "py27-str-unicode-bytes.py", line 17, in <module> unicode_str += b # this line will throw UnicodeDecodeError on Python 2.7 UnicodeDecodeError: 'ascii' codec can't decode byte 0xff in position 4: ordinal not in range(128)
And of course it doesn't work earlier than 2.6 since the b'' notation isn't supported before 2.6. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue12398> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com