[ python-Bugs-1079011 ] Incorrect error message (somewhat)
SourceForge.net
noreply at sourceforge.net
Fri Dec 10 18:31:56 CET 2004
Bugs item #1079011, was opened at 2004-12-04 14:44
Message generated for change (Comment added) made by rhettinger
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1079011&group_id=5470
Category: Python Interpreter Core
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Gerrit Holl (gerrit)
Assigned to: Nobody/Anonymous (nobody)
Summary: Incorrect error message (somewhat)
Initial Comment:
Comparing complex numbers with cmp yields:
>>> cmp(1+3j, 1+3j)
0
>>> cmp(1+3j, 3+4j)
Traceback (most recent call last):
File "<stdin>", line 1, in ?
TypeError: cannot compare complex numbers using <, <=,
>, >=
Well, I didn't use <, <=, > or >=. It's not a major
bug, but it doesn't look too nice... would it be
possible to return NotImplemented? Or would that be
semantically incorrect?
----------------------------------------------------------------------
>Comment By: Raymond Hettinger (rhettinger)
Date: 2004-12-10 12:31
Message:
Logged In: YES
user_id=80475
That is incorrect be == and != are implemented.
The message is slightly weird but still helpful. Any
rewording I can think of makes the message more obtuse, so I
recommend leaving it alone and closing this bug.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1079011&group_id=5470
More information about the Python-bugs-list
mailing list