Issue1869347

classification
Title: TypeError while used derived class of long for comparison
Type: Severity: normal
Components: None Versions:
process
Status: closed Resolution: fixed
Dependencies: PyDictionaryDerived.__cmp__ is not fully CPython-compatible
View: 1031
Superseder:
Assigned To: leosoto Nosy List: leosoto, mehendran, pjenvey
Priority: normal Keywords:

Created on 2008-01-11.14:26:55 by mehendran, last changed 2008-08-11.14:52:14 by leosoto.

Messages
msg2055 (view) Author: Mehendran (mehendran) Date: 2008-01-11.14:26:55
I am getting error when I use the following code

The code:
class mylong(long):
    pass
print 'Me' in [mylong(12L), 'Me', 45, 'cool']

The above code works in python not in jython.

Error: TypeError: long.__cmp__(x,y) requires y to be 'long', not a 'str'
msg3238 (view) Author: Philip Jenvey (pjenvey) Date: 2008-06-08.00:07:48
#1031 looks like a dupe of this. I'll keep both open since they affect 
different classes, but mention this one there
msg3415 (view) Author: Leonardo Soto (leosoto) Date: 2008-08-10.21:15:20
Fixed on asm branch (test added on r5135).
msg3417 (view) Author: Leonardo Soto (leosoto) Date: 2008-08-11.03:17:46
Oops, the added test showed some problems with coercion. Reopening.
msg3421 (view) Author: Leonardo Soto (leosoto) Date: 2008-08-11.14:52:13
Really fixed on r5144
History
Date User Action Args
2008-08-11 14:52:14leosotosetstatus: open -> closed
resolution: fixed
messages: + msg3421
2008-08-11 03:18:05leosotosetassignee: leosoto
2008-08-11 03:17:47leosotosetstatus: closed -> open
resolution: fixed -> (no value)
messages: + msg3417
2008-08-10 21:15:20leosotosetstatus: open -> closed
resolution: fixed
messages: + msg3415
nosy: + leosoto
2008-06-08 00:08:32pjenveysetdependencies: + PyDictionaryDerived.__cmp__ is not fully CPython-compatible
2008-06-08 00:07:49pjenveysetnosy: + pjenvey
messages: + msg3238
2008-01-11 14:26:55mehendrancreate