diff --git a/pep-3137.txt b/pep-3137.txt index 882abc89e..2b308e509 100644 --- a/pep-3137.txt +++ b/pep-3137.txt @@ -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, [, ])`` is equivalent to -``b.encode([, ])``, and +``b.decode([, ])``, and ``bytes(s, [, ])`` is equivalent to -``s.decode([, ])``. +``s.encode([, ])``. There is one exception: we can convert from bytes (or buffer) to str without specifying an encoding by writing ``str(b)``. This produces