Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

Backport of fba6df1 from master
  • Loading branch information...
commit 3919810923d44d0cd8068ab7b21c8aba041180ed 1 parent 171a663
@intgr intgr authored timgraham committed
Showing with 1 addition and 1 deletion.
  1. +1 −1  docs/topics/python3.txt
View
2  docs/topics/python3.txt
@@ -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::
Please sign in to comment.
Something went wrong with that request. Please try again.