unicode() vs. s.decode()

Michael Ströder michael at stroeder.com
Wed Aug 5 16:43:09 CEST 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