Fixed encode()/decode() turn-around.
This commit is contained in:
parent
74119bb932
commit
a3b2617793
|
@ -230,9 +230,9 @@ should just return False).
|
|||
Conversions between bytes or buffer objects and str objects must
|
||||
always be explicit, using an encoding. There are two equivalent APIs:
|
||||
``str(b, <encoding>[, <errors>])`` is equivalent to
|
||||
``b.encode(<encoding>[, <errors>])``, and
|
||||
``b.decode(<encoding>[, <errors>])``, and
|
||||
``bytes(s, <encoding>[, <errors>])`` is equivalent to
|
||||
``s.decode(<encoding>[, <errors>])``.
|
||||
``s.encode(<encoding>[, <errors>])``.
|
||||
|
||||
There is one exception: we can convert from bytes (or buffer) to str
|
||||
without specifying an encoding by writing ``str(b)``. This produces
|
||||
|
|
Loading…
Reference in New Issue