unicode() vs. s.decode()

Michael Ströder michael at stroeder.com
Wed Aug 5 10:43:09 EDT 2009


HI!

These both expressions are equivalent but which is faster or should be used
for any reason?

u = unicode(s,'utf-8')

u = s.decode('utf-8') # looks nicer

Ciao, Michael.



More information about the Python-list mailing list