Fix another paragraph that was referring to bytes()==str() raising TypeError.
This commit is contained in:
parent
e2096897b5
commit
ded68a78fc
|
@ -234,12 +234,11 @@ Bytes and the Str Type
|
||||||
----------------------
|
----------------------
|
||||||
|
|
||||||
Like the bytes type in Python 3.0a1, and unlike the relationship
|
Like the bytes type in Python 3.0a1, and unlike the relationship
|
||||||
between str and unicode in Python 2.x, any attempt to mix bytes (or
|
between str and unicode in Python 2.x, attempts to mix bytes (or
|
||||||
buffer) objects and str objects without specifying an encoding will
|
buffer) objects and str objects without specifying an encoding will
|
||||||
raise a TypeError exception. This is the case even for simply
|
raise a TypeError exception. (However, comparing bytes/buffer and str
|
||||||
comparing a bytes or buffer object to a str object (even violating the
|
objects for equality will simply return False; see the section on
|
||||||
general rule that comparing objects of different types for equality
|
Comparisons above.)
|
||||||
should just return False).
|
|
||||||
|
|
||||||
Conversions between bytes or buffer objects and str objects must
|
Conversions between bytes or buffer objects and str objects must
|
||||||
always be explicit, using an encoding. There are two equivalent APIs:
|
always be explicit, using an encoding. There are two equivalent APIs:
|
||||||
|
|
Loading…
Reference in New Issue