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 <rep...@bugs.python.org> <http://bugs.python.org/issue22556> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com