George Sakkis wrote:
It depends on what you mean by "compatible"; e.g. you can't safely do [s.decode('utf8') for s in strings] if you have byte strings mixed with unicode.
why would you want to decode strings given to you by a library that returns decoded strings?
if you meant to write "encode", you can indeed safely do [s.encode('utf8') for s in strings] as long as all strings are returned by an ET implementation.
</F> -- http://mail.python.org/mailman/listinfo/python-list