Message31422
There is no such rule, and it's quite deliberate that the newer types (like datetime objects and sets) raise an exception on mixed-type inequality comparisons. For older types, the result of inequality comparison with None isn't defined by the language, and the outcome does vary across CPython releases.
Rejecting this, since the code is working as designed and documented (see, e.g., footnote (4) in the datetime docs: "Note: In order to stop comparison from falling back to the default scheme of comparing object addresses, datetime comparison normally raises TypeError if the other comparand isn't also a datetime object. However, ..."). |
|
Date |
User |
Action |
Args |
2007-08-23 14:52:16 | admin | link | issue1673405 messages |
2007-08-23 14:52:16 | admin | create | |
|