why not bisect options?

Paul Rubin http
Sat Mar 1 14:36:05 EST 2008


Raymond Hettinger <python at rcn.com> writes:
> The sort() function guarantees that it calls the key function exactly
> once for each member of the list. 

That is a time-space tradeoff though, and it presupposes that it's
possible to write a key function.  Depending on the objects involved,
it could be that it's easier to write a comparison function than a
key function.



More information about the Python-list mailing list