mirror of
https://github.com/django/django.git
synced 2025-06-05 03:29:12 +00:00
[1.5.x] [py3] str.decode does not exist; str.encode was intended
Backport of fba6df19b5 from master
This commit is contained in:
parent
171a6635d2
commit
3919810923
@ -238,7 +238,7 @@ under Python 3, use the :func:`str` builtin::
|
|||||||
str('my string')
|
str('my string')
|
||||||
|
|
||||||
In Python 3, there aren't any automatic conversions between ``str`` and
|
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
|
always returns ``bytes``, and ``bytes.decode`` always returns ``str``. As a
|
||||||
consequence, the following pattern is sometimes necessary::
|
consequence, the following pattern is sometimes necessary::
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user