[Python-bugs-list] [ python-Bugs-676155 ] RuntimeWarning with tp_compare
SourceForge.net
noreply@sourceforge.net
Tue, 28 Jan 2003 09:23:12 -0800
Bugs item #676155, was opened at 2003-01-28 10:55
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=676155&group_id=5470
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Andrew Dalke (dalke)
Assigned to: Nobody/Anonymous (nobody)
Summary: RuntimeWarning with tp_compare
Initial Comment:
>From the latest CVS, as of the morning of Jan. 28 2003
>>> s = "12345" * 1000
>>> float(s) == int(s)
__main__:1: RuntimeWarning: tp_compare didn't return -1
or -2 for exception
Traceback (most recent call last):
File "<stdin>", line 1, in ?
OverflowError: long int too large to convert to float
>>>
----------------------------------------------------------------------
>Comment By: Neal Norwitz (nnorwitz)
Date: 2003-01-28 12:23
Message:
Logged In: YES
user_id=33168
I thought I fixed the problem in one place (patch attached).
That fixes this problem:
coerce(0.5, int(s))
With this patch, I get:
XXX undetected error (why=3)
----------------------------------------------------------------------
Comment By: Michael Hudson (mwh)
Date: 2003-01-28 12:15
Message:
Logged In: YES
user_id=6656
Hmm, wierd. I think there may be a case of something
setting an exception and then not returning NULL (or
whatever). You can certainly get some wierd tracebacks.
Buggered if I know where though -- "you are in a maze of
twisty function calls, all alike" :-/
Some playing with a debug build and gdb coming up...
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=676155&group_id=5470