r58291 - peps/trunk/pep-3137.txt
![](https://secure.gravatar.com/avatar/8ac615df352a970211b0e3d94a307c6d.jpg?s=120&d=mm&r=g)
Author: guido.van.rossum Date: Mon Oct 1 04:58:22 2007 New Revision: 58291 Modified: peps/trunk/pep-3137.txt Log: Fix another paragraph that was referring to bytes()==str() raising TypeError. Modified: peps/trunk/pep-3137.txt ============================================================================== --- peps/trunk/pep-3137.txt (original) +++ peps/trunk/pep-3137.txt Mon Oct 1 04:58:22 2007 @@ -234,12 +234,11 @@ ---------------------- 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:
participants (1)
-
guido.van.rossum