diff options
| author | Marti Raudsepp <marti@juffo.org> | 2013-02-26 23:28:47 +0200 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2013-02-27 16:18:06 -0500 |
| commit | 3919810923d44d0cd8068ab7b21c8aba041180ed (patch) | |
| tree | 67736d5e636b7c8c5b07cd28e0cb334f4a58ae7f | |
| parent | 171a6635d2948bb7181d39193aca1d4ae6b297f0 (diff) | |
[1.5.x] [py3] str.decode does not exist; str.encode was intended
Backport of fba6df19b5 from master
| -rw-r--r-- | docs/topics/python3.txt | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/topics/python3.txt b/docs/topics/python3.txt index b44c180d7f..9941597c3a 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:: |
