Issue 20077: Format of TypeError differs between comparison and arithmetic operators (original) (raw)

Created on 2013-12-27 01:16 by MLModel, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
20077.patch gennad,2013-12-27 22:38 review
Messages (5)
msg206977 - (view) Author: Mitchell Model (MLModel) Date: 2013-12-27 01:16
[ctypes correct component for this?] The TypeError messages given for incompatible types in comparison operators differ from incompatible types in arithmetic operators. The arithmetic operator error messages show the names of the types in single quotes, while the comparison error messages do not use quotes but follow the name of the type with a pair of parens. Seems like these should be analogous. class foo(): pass ... >>> foo() + 1 Traceback (most recent call last): File "", line 1, in TypeError: unsupported operand type(s) for +: 'foo' and 'int' >>> foo() < 1 Traceback (most recent call last): File "", line 1, in TypeError: unorderable types: foo() < int()
msg207013 - (view) Author: Gennadiy Zlobin (gennad) * Date: 2013-12-27 22:38
I created a patch for it, please review
msg207133 - (view) Author: Mitchell Model (MLModel) Date: 2014-01-01 14:02
Patch looks good to me. I like the choice to drop the parens. This is my first time reviewing a change; did I go through the right mechanics? I clicked Review on the issue's patch, looked at the diff, and a published a message similar to this one. Was I supposed to do something else? Is that message what "Review" is looking for? Was the "Please review" directed at me? Am I supposed to make a comment like "looks good" here? do something else?
msg216079 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2014-04-14 13:52
I think 'please review' was directed at anyone, and yes, using the review link is one way to do a review, but when there isn't enough line-by-line commenting to make the code review tool worth using you can just post on the issue. (And when you do use the review link, it is helpful to post a message here that you did, since one doesn't appear automatically...which is something we need to fix.)
msg264036 - (view) Author: Berker Peksag (berker.peksag) * (Python committer) Date: 2016-04-23 01:52
The exception message has been updated to "TypeError: '<' not supported between instances of 'Color' and 'Color'" in 0238eafb68da. Closing this as 'out of date'.
History
Date User Action Args
2022-04-11 14:57:55 admin set github: 64276
2016-04-23 01:52:40 berker.peksag set status: open -> closednosy: + berker.peksagmessages: + resolution: out of datestage: resolved
2014-04-14 13:52:40 r.david.murray set nosy: + r.david.murraymessages: +
2014-01-01 14:02:30 MLModel set messages: +
2013-12-27 22:38:14 gennad set files: + 20077.patchnosy: + gennadmessages: + keywords: + patch
2013-12-27 22:29:13 eric.araujo set nosy: + ncoghlancomponents: + Interpreter Core, - ctypesversions: + Python 3.5, - Python 3.3, Python 3.4
2013-12-27 01:16:10 MLModel create