diff options
| author | Marti Raudsepp <marti@juffo.org> | 2013-02-26 23:28:47 +0200 |
|---|---|---|
| committer | Marti Raudsepp <marti@juffo.org> | 2013-02-26 23:28:47 +0200 |
| commit | fba6df19b5d7076e6858b3bd773911a529d60b30 (patch) | |
| tree | 9941c487d4c35104571c373441ccc1b26c47275a /docs/topics/python3.txt | |
| parent | 58a2fc820eba04a24c7cc6d4c66b5aea6abe8c5a (diff) | |
[py3] str.decode does not exist; str.encode was intended
Diffstat (limited to 'docs/topics/python3.txt')
| -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 b1f3fa3277..2212a24131 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:: |
