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 ezio.melotti
Recipients Mark.Shannon, ezio.melotti, r.david.murray, serhiy.storchaka, vstinner
Date 2015-09-24.06:07:04
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1443074824.75.0.402143377912.issue25210@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2015-09-24 06:07:04ezio.melottisetrecipients: + ezio.melotti, vstinner, r.david.murray, Mark.Shannon, serhiy.storchaka
2015-09-24 06:07:04ezio.melottisetmessageid: <1443074824.75.0.402143377912.issue25210@psf.upfronthosting.co.za>
2015-09-24 06:07:04ezio.melottilinkissue25210 messages
2015-09-24 06:07:04ezio.melotticreate