[ python-Bugs-1764761 ] Decimal comparison with None fails in Windows

SourceForge.net noreply at sourceforge.net
Fri Aug 3 04:59:41 CEST 2007


Bugs item #1764761, was opened at 2007-07-31 13:34
Message generated for change (Comment added) made by facundobatista
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1764761&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 Library
Group: Python 2.5
>Status: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: pablohoffman.com (pablohoffman)
Assigned to: Facundo Batista (facundobatista)
Summary: Decimal comparison with None fails in Windows

Initial Comment:
The version used to test this was:
Python 2.5.1 (r251:54863, May  2 2007, 16:56:35) 

In Linux:
>>> from decimal import Decimal
>>> Decimal('1') < None
False
>>>

In Windows:
>>> from decimal import Decimal
>>> Decimal('1') < None
True
>>>

This is probably a Windows bug since both platforms do:

>>> 1 < None
False


----------------------------------------------------------------------

>Comment By: Facundo Batista (facundobatista)
Date: 2007-08-02 23:59

Message:
Logged In: YES 
user_id=752496
Originator: NO

Solved, the problem was that __cmp__ was returning NotImplemented, which
is not allowed (is not defined, that's why the different behaviour in
different systems).

The solution was commited in revision 56682, in the decimal branch.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1764761&group_id=5470


More information about the Python-bugs-list mailing list