[Python-Dev] python 3 niggle: None < 1 raises TypeError

Paul Moore p.f.moore at gmail.com
Tue Feb 18 22:24:40 CET 2014


On 18 February 2014 21:17, Greg Ewing <greg.ewing at canterbury.ac.nz> wrote:
> What I'd *really* like to be able to write is:
>
>    sort(invoices, keyattr = 'duedate', none = 'first')

Which is of course a pretty trivial utility function to write. But I
understand your point - these "trivial helpers" add up over time into
a bit of a burden. But fixing that (if anyone feels it's worth doing
so) can be handled many ways, and changing the semantics of None is
far from the simplest or most obvious.

Pul


More information about the Python-Dev mailing list