[issue25210] Special-case NoneType() in do_richcompare()
STINNER Victor
report at bugs.python.org
Tue Sep 22 12:16:48 CEST 2015
STINNER Victor added the comment:
> TypeError: unorderable types: int() < NoneType()
The error message looks good to me: NoneType is the type of the None singleton:
>>> type(None)
<class 'NoneType'>
>>> x=type(None)()
>>> x is None
True
Do you propose to use the message "TypeError: unorderable types: int() < None"? This message looks wrong to me, None is not a type.
The strange thing is the trailing parenthesis!? Why not "int < NoneType"?
----------
nosy: +haypo
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue25210>
_______________________________________
More information about the Python-bugs-list
mailing list