[ python-Bugs-1536786 ] buffer comparison emits a RuntimeWarning
SourceForge.net
noreply at sourceforge.net
Tue Aug 8 17:50:52 CEST 2006
Bugs item #1536786, was opened at 2006-08-08 17:50
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1536786&group_id=5470
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Interpreter Core
Group: Python 2.5
Status: Open
Resolution: None
Priority: 5
Submitted By: Thomas Heller (theller)
Assigned to: Nobody/Anonymous (nobody)
Summary: buffer comparison emits a RuntimeWarning
Initial Comment:
On some systems, the memcmp() function returns values
other than -1, 0, or +1, which gives a warning:
>>> cmp(buffer("abc"), buffer("def"))
__main__:1: RuntimeWarning: tp_compare didn't return
-1, 0 or 1
-1
>>>
The problem occurred on OS X and Windows CE.
Patch and test attached.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1536786&group_id=5470
More information about the Python-bugs-list
mailing list