Skip to content

Commit

Permalink
[1.5.x] [py3] str.decode does not exist; str.encode was intended
Browse files Browse the repository at this point in the history
Backport of fba6df1 from master
  • Loading branch information
intgr authored and timgraham committed Feb 27, 2013
1 parent 171a663 commit 3919810
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/topics/python3.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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::

Expand Down

0 comments on commit 3919810

Please sign in to comment.