Q: sort's key and cmp parameters
Luis Zarrabeitia
kyrie at uh.cu
Wed Oct 7 11:30:09 EDT 2009
On Tuesday 06 October 2009 02:40:46 pm Paul Rubin wrote:
> > The problem is that if you allow to use the cmp, lot of programmers
> > will use it straight away, not even bothering to know what that
> > strange 'key' argument may be useful for. And they miss the how much
> > handy 'key' is.
>
> Given how often we hear "consenting adults" as justification for any
> number of gaps in Python error checking, the argument above is
> singularly unpersuasive.
Well, as long as you consider them "gaps" in need of a "justification", of
course that argument (and the one about the "gaps" themselves) will of course
seem singularly unpersuasive.
But if you see them as a "feature" (that may sometimes, albeit rarely,
missfire), then you would have no problem with /either/ argument.
--
Luis Zarrabeitia (aka Kyrie)
Fac. de Matemática y Computación, UH.
http://profesores.matcom.uh.cu/~kyrie
More information about the Python-list
mailing list