[py3] str.decode does not exist; str.encode was intended

This commit is contained in:
Marti Raudsepp 2013-02-26 23:28:47 +02:00
parent 58a2fc820e
commit fba6df19b5
1 changed files with 1 additions and 1 deletions

View File

@ -238,7 +238,7 @@ under Python 3, use the :func:`str` builtin::
str('my string')
In Python 3, there aren't any automatic conversions between ``str`` and
``bytes``, and the :mod:`codecs` module became more strict. :meth:`str.decode`
``bytes``, and the :mod:`codecs` module became more strict. :meth:`str.encode`
always returns ``bytes``, and ``bytes.decode`` always returns ``str``. As a
consequence, the following pattern is sometimes necessary::