Fixed encode()/decode() turn-around.

This commit is contained in:
Guido van Rossum 2007-09-27 14:24:32 +00:00
parent 74119bb932
commit a3b2617793
1 changed files with 2 additions and 2 deletions

View File

@ -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