unicode woes

Matt Gerrans mgerrans at mindspring.com
Sun Oct 6 07:36:10 CEST 2002


> - Never mix byte strings and Unicode strings (unless the byte strings
>   are restricted to bytes <127, perhaps).

Could you elaborate a bit more on this point?   I thought this was okay to
do, since the byte string will be promoted to unicode.   For instance:

>>> 'abcd' + u'zyxw'
u'abcdzyxw'

Is this an acceptible thing to do?






More information about the Python-list mailing list