Message251487
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. |
|
Date |
User |
Action |
Args |
2015-09-24 06:07:04 | ezio.melotti | set | recipients:
+ ezio.melotti, vstinner, r.david.murray, Mark.Shannon, serhiy.storchaka |
2015-09-24 06:07:04 | ezio.melotti | set | messageid: <1443074824.75.0.402143377912.issue25210@psf.upfronthosting.co.za> |
2015-09-24 06:07:04 | ezio.melotti | link | issue25210 messages |
2015-09-24 06:07:04 | ezio.melotti | create | |
|