In someone else's code I saw this:
return u'' The empty unicode string u'' somehow different from just the empty string '' ? If so, what?
In someone else's code I saw this:
return u'' The empty unicode string u'' somehow different from just the empty string '' ? If so, what?
The difference in type:
>>> u'' == '' True >>> type(u'') == type('') False >>> type(u'') <type 'unicode'> >>> type('') <type 'str'> Although it is rather ephemeral:
>>> type('' u'я') <type 'unicode'> Source: https://ru.stackoverflow.com/questions/746926/
All Articles