[issue22556] datetime comparison with 'None' returning a TypeError

Eric V. Smith report at bugs.python.org
Sun Oct 5 15:52:42 CEST 2014


Eric V. Smith added the comment:

You've identified the main problem: would None go first or last? Modify your key function to make the decision appropriate for you, returning either a very small or very large value for None, as appropriate.

If you really want to see this behavior changed, you should have a concrete proposal and bring it up on the python-ideas mailing list.

----------
nosy: +eric.smith
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed
type: compile error -> behavior

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue22556>
_______________________________________


More information about the Python-bugs-list mailing list