[issue1609] test_re.py fails

Martin v. Löwis report at bugs.python.org
Thu Dec 20 21:45:38 CET 2007


Martin v. Löwis added the comment:

> print "iiii".encode("iso-8859-9").upper().decode("iso-8859-9")
> does not

Please get your types right. "iiii" is a byte string (in Python 2.x).
encode: unicode -> string
decode: string -> unicode

That you still can apply .encode to the byte string is a bug/pit fall in
Python 2.x, which gets fixed in 3.x (by only supporting .encode on the
unicode type).

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1609>
__________________________________


More information about the Python-bugs-list mailing list