[ python-Feature Requests-906746 ] int object need more informative
error message
SourceForge.net
noreply at sourceforge.net
Fri May 21 02:09:00 EDT 2004
Feature Requests item #906746, was opened at 2004-02-28 22:14
Message generated for change (Comment added) made by rhettinger
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=355470&aid=906746&group_id=5470
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: George Yoshida (quiver)
Assigned to: Nobody/Anonymous (nobody)
Summary: int object need more informative error message
Initial Comment:
When int objects encounter a NotImplementedError,
they don't say much about what the problem is and are
too unfriendly.
Error messages can be more verbose.
>>> reduce(int.__add__, (1, 2L))
NotImplemented
>>> reduce(int.__add__, (1L, 2))
Traceback (most recent call last):
File "<stdin>", line 1, in ?
TypeError: descriptor '__add__' requires a 'int' object but
received a 'long'
----------------------------------------------------------------------
>Comment By: Raymond Hettinger (rhettinger)
Date: 2004-05-21 01:09
Message:
Logged In: YES
user_id=80475
Unfortunately, there may not be any flexibility here. Instead
of being just an error message, NotImplemented is a
constant that has meaning to other layers of code. I don't
see a way to change this or even attach a more informative
error message.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=355470&aid=906746&group_id=5470
More information about the Python-bugs-list
mailing list