This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author r.david.murray
Recipients Mark.Shannon, ezio.melotti, r.david.murray, serhiy.storchaka, vstinner
Date 2015-09-24.15:45:30
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1443109531.05.0.494153944673.issue25210@psf.upfronthosting.co.za>
In-reply-to
Content
That's why I said that making it like the other binary op messages might be better.  Currently the error message says that the error is that two types were compared ("unorderable types"), which as you point is not quite accurate.  It is, however, fairly parallel to the message used for binary operations:

   TypeError: unsupported operand type(s) for +: 'int' and 'NoneType'

I think it would be good to change the existing message to match:

   TypeError: unsupported operand type(s) for '<': 'int' and 'NoneType'

The *best* change would be something like:

   TypeError: '<' does not support comparison of operands whose types are 'int' and 'NoneType'
   TypeError: '+' does not support addition of operands whose types are 'int' and 'NoneType'

But that might be much harder to implement depending on how the binary op error message(s) are implemented.  Leave out "addition of" and "comparison of" in the above messages and they might still be better than the status quo, but probably not enough to warrant doing it if doing it is hard.
History
Date User Action Args
2015-09-24 15:45:31r.david.murraysetrecipients: + r.david.murray, vstinner, ezio.melotti, Mark.Shannon, serhiy.storchaka
2015-09-24 15:45:31r.david.murraysetmessageid: <1443109531.05.0.494153944673.issue25210@psf.upfronthosting.co.za>
2015-09-24 15:45:31r.david.murraylinkissue25210 messages
2015-09-24 15:45:30r.david.murraycreate