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
|
||||
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
|
||||
raise a TypeError exception. This is the case even for simply
|
||||
comparing a bytes or buffer object to a str object (even violating the
|
||||
general rule that comparing objects of different types for equality
|
||||
should just return False).
|
||||
raise a TypeError exception. (However, comparing bytes/buffer and str
|
||||
objects for equality will simply return False; see the section on
|
||||
Comparisons above.)
|
||||
|
||||
Conversions between bytes or buffer objects and str objects must
|
||||
always be explicit, using an encoding. There are two equivalent APIs:
|
||||
|
|
Loading…
Reference in New Issue