Ezio Melotti added the comment:

This case is different from most of the others though, because while it talks 
about unorderable types, it provides an example showing two instances (hence 
the parentheses).

In these NoneType is correct:
>>> int(None)
TypeError: int() argument must be a string or a number, not 'NoneType'
>>> abs(None)
TypeError: bad operand type for abs(): 'NoneType'
>>> [][None]
TypeError: list indices must be integers, not NoneType

In this NoneType() is equivalent to the None singleton (and int() is a 
not-better-specified instance of int):
>>> 3 < None
TypeError: unorderable types: int() < NoneType()

So I would either special-case None, remove the () and the comment, or show 
both the types and the repr() of the two objects.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue25210>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to