Newbie: finding the key/index of the min/max element

Alex Martelli aleax at aleax.it
Thu May 2 09:40:38 EDT 2002


James J. Besemer wrote:
        ...
> And anyway, if some questions persist in coming up over and over -- don't
> you have to put your own prejudice aside and ask if maybe there's a point?

Sure, but it's an easy point to see -- "adding something costs little, so
why not just add it?  removing something costs a lot, so never remove!".

Clearly, each of the many "persistent" questions tends to relate to
features of other languages the querants know.  They're used to them, so
they *WANT* them -- if they're decent rationalizers (and most of us are)
they'll come up with oodles of almost-plausibly-sounding "reasons", of
course.  "wild and wooly" ideas not tried elsewhere do come up, but not
repetitively (that I recall -- and this makes sense to me).

Giving in may appear to make some kind of local-optimization sense in each 
and any case.  Net result, should you give in to the pressure in each case, 
a language so huge, bloated, and unwieldy as to dwarf C++ or Perl or ....

Obviously, each change-proponent will stubbornly refuse to look at the
large picture and insist that *just HIS own little favourite addition*
can't be said on its own to bloat the language.  Local vs global thinking,
again.  Surely somebody who has a billion dollars isn't impoverished if I,
personally, manage to get 1000 bucks of his money?  He'll hardly notice.
And _I_ could really use that money!  Well, maybe, but -- if it happens
a million times, the rich guy has just become a pauper.  Some would not
mind in the least, of course:-).


The same goes for removing some feature that doesn't carry its weight any
more, even though the screamers in this case might more likely be people
who've been using the language for quite some time.  "There's 100's of
language features, surely the gradual removal of ONE can't give any
benefit".  I claim it can -- because the only way to do it IS one by one.

Here, the analogy that comes to mind is an overweight person who'd really
like to slim down, but won't start dieting and exercising, because a week 
or two of diet and exercise can hardly mean more than a pound or two of
weight loss, and what good would that little do, anyway?


In the end, all decisions about Python rest with the BDFL.  But he listens
to arguments, proposals, and so on -- at least once they're formalized in
a PEP, which is supposed to carry all arguments both pro and con the
proposed "Enhancement".  Discussions _about changes_ without a PEP can only
be a preliminary to a PEP, or else totally futile.  In my limited and
biased experience of this group, "totally futile" covers a majority of
cases.  On the other hand, a PEP would never be out of place, unless it
duplicates an existing (presumably closed/rejected) one.  Even a PEP that
is _meant_ to be rejected makes sense (see PEP 666), to get down the
rationale for rejection permanently in the right place.  So far I haven't
seen a "futile" PEP, despite some occasional, partial duplication.


Alex




More information about the Python-list mailing list