From fba6df19b5d7076e6858b3bd773911a529d60b30 Mon Sep 17 00:00:00 2001 From: Marti Raudsepp Date: Tue, 26 Feb 2013 23:28:47 +0200 Subject: [PATCH] [py3] str.decode does not exist; str.encode was intended --- docs/topics/python3.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/topics/python3.txt b/docs/topics/python3.txt index b1f3fa3277e..2212a24131c 100644 --- a/docs/topics/python3.txt +++ b/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::