With this new support comes a very important distinction. Python 3.0 handles strings differently depending on whether the string is encoded. Unencoded strings are viewed as text and are handled as type str. Encoded strings, however, are binary data and are handled as type bytes.
The new Unicode default is underscored by the discontinuance of the u"..." literal for Unicode text. Instead, one must now use b"..." literals. The latter indicates overtly that the string in question is to be treated as encoded data.
For more on managing the text and data differentiation in Python 3.0, see "A Guide to Text vs Data in Python 3.0".
>>> y = b"Hello World!" >>> type(y) <class 'bytes'> >>> y = "Hello World!" >>> type(y) <class 'str'>