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 serhiy.storchaka
Recipients Mark.Shannon, ezio.melotti, r.david.murray, serhiy.storchaka, vstinner
Date 2015-09-24.07:00:06
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1443078006.55.0.880532201273.issue25210@psf.upfronthosting.co.za>
In-reply-to
Content
And this is the only case where type name followed with '()' is occurred in error message. The repr() shouldn't be used in error message because it can be too long (imagine 'x'*10**9 < None) and can raise an exception.

IMHO more correct would be message "unorderable types: int and NoneType", but it lose the information about operation.

Yet one option is to follow the template for other binary operators:

>>> 1 + None
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: unsupported operand type(s) for +: 'int' and 'NoneType'
History
Date User Action Args
2015-09-24 07:00:06serhiy.storchakasetrecipients: + serhiy.storchaka, vstinner, ezio.melotti, r.david.murray, Mark.Shannon
2015-09-24 07:00:06serhiy.storchakasetmessageid: <1443078006.55.0.880532201273.issue25210@psf.upfronthosting.co.za>
2015-09-24 07:00:06serhiy.storchakalinkissue25210 messages
2015-09-24 07:00:06serhiy.storchakacreate