Just a little reminder in all this noise... The correct thing to do with unicode(u'a unicode string') is MAKE NO CHANGE. The correct thing to do with str('an ASCII string') is MAKE NO CHANGE.
The Zen of Python says: Explicit is better than implicit. Special cases aren't special enough to break the rules. In the face of ambiguity, refuse the temptation to guess. If the implementation is hard to explain, it's a bad idea. If the implementation is easy to explain, it may be a good idea. IMHO, if a programmer expects str() or unicode() to make a change in the encoding of a string-like object, (s)he should be encouraged/forced to use .encode() or .decode() to get his(er) intended result. -- Vernon Cole
_______________________________________________ Users mailing list Users@lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com