[Python-checkins] r58273 - peps/trunk/pep-3137.txt
guido.van.rossum
python-checkins at python.org
Thu Sep 27 16:24:33 CEST 2007
Author: guido.van.rossum
Date: Thu Sep 27 16:24:32 2007
New Revision: 58273
Modified:
peps/trunk/pep-3137.txt
Log:
Fixed encode()/decode() turn-around.
Modified: peps/trunk/pep-3137.txt
==============================================================================
--- peps/trunk/pep-3137.txt (original)
+++ peps/trunk/pep-3137.txt Thu Sep 27 16:24:32 2007
@@ -230,9 +230,9 @@
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
More information about the Python-checkins
mailing list