Title: PEP 3137 patch: PyBytes/PyUnicode comparisons
Type: enhancement Stage:
Components: Interpreter Core Versions: Python 3.0
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: gvanrossum Nosy List: gvanrossum, thomaslee
Priority: normal Keywords:

Created on 2007-10-09 13:38 by thomaslee, last changed 2007-10-09 17:21 by gvanrossum. This issue is now closed.

File name Uploaded Description Edit
bytes-unicode-return-false-r1.patch thomaslee, 2007-10-09 13:38
bytes-unicode-eq-false-r2.patch thomaslee, 2007-10-09 16:05
Messages (3)
msg56284 - (view) Author: Thomas Lee (thomaslee) (Python committer) Date: 2007-10-09 13:38
Initial patch attached.
msg56285 - (view) Author: Thomas Lee (thomaslee) (Python committer) Date: 2007-10-09 16:05
Revised patch - originally misinterpreted what was required here.
bytes() == str() now returns False, bytes() != str() now returns True.
msg56286 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2007-10-09 17:21

This patch looks fine, except the PyClear() call is unnecessary.  I
suppose you copied it from the similar return clauses further down, but
there they clear an exception set by the _getbuffer() call.  But just
calling PyObject_IsInstance() cannot set an exception.

Committed revision 58390.
Date User Action Args
2007-10-09 17:21:20gvanrossumsetstatus: open -> closed
resolution: accepted
messages: + msg56286
2007-10-09 17:03:55gvanrossumsetassignee: gvanrossum
nosy: + gvanrossum
2007-10-09 16:05:42thomasleesetfiles: + bytes-unicode-eq-false-r2.patch
messages: + msg56285
title: PEP 3137 patch: make PyBytes/PyUnicode ==/!= comparisons return False -> PEP 3137 patch: PyBytes/PyUnicode comparisons
2007-10-09 13:38:27thomasleecreate