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

Steve Holden sholden at holdenweb.com
Thu May 2 15:27:41 EDT 2002


"James J. Besemer" <jb at cascade-sys.com> wrote ...
>
> Alex Martelli wrote:
>
> > Actually, _I_ wouldn't mind it if there was a way to discourage people
> > from starting Yet Another Round of language-change proposals or whines
> > and complaints against some aspect of the language they have not
> > carefully considered.
>
> It strikes me as somewhat arbitrary that "newbie" questions or comments
> about language features are so irritating while answering newbie questions
> over and over about how to split a text line into fields (or to measure
> performance) is not.
> IMHO, they both seem legitimate questions.
>
Perhaps the difference depends on what one enjoys doing? Alex does
occasionally suffer from the whimsical misapprehension that people who make
mistaken assertions want them to be corrected :-)

> For the record, I did not initiate any of these language extension topics.
> I only joined in after someone else put them into play.
>
Call that an excuse? Do you want the five-minute argument or the ten-minute
argument?

> > But
> > I just hope I'll be in one of my time-management-necessitated
> > periods of abstinence from this group next time some newbie
> > arrogantly and querulously teaches us why Python should have
> > [a] explicit block delimiters, [b] join as a method of all the
> > possible sequences and not of joiner-objects, [c] hygienic
> > macros, [d] booleans -- oops forget I mentioned the latter, since
> > they're now BDFL-blessed cruf^H^H^H^H brilliant innovations...:-).
>
> A traditional solution for this would be for someone to write and maintain
a
> FAQ for the list.  By tradition, list FAQs can prominently feature a list
of
> arbitrary topics that are strictly off limits.  New members can be pointed
> to the FAQ and people who willfully disregard the FAQ can be dealt with.
>

There is, of course, the good old auto-FAQ available in searchable form at

    http://www.python.org/cgi-bin/faqw.py

and as a static HTML file at

    http://www.python.org/doc/FAQ.html

> Otherwise, it's generally impossible for newcomers to know that a
particular
> topic is taboo or has been previously beaten to death.  A smart guy like
> probably should have been able to guess but I was initially misled by the
> unusually broad range of evidently legal topics on this list; the
boundaries
> are entirely non obvious.  People like myself are perfectly capable of
> following rules that are clearly posted and duly established, as opposed
to
> individual complaints that for all we know are merely one person's
opinion.
>
Acceptable topics are anything you don't get flamed for ;-). Actually there
aren't many rules on this group, and readers tend by and large to be a
pretty tolerant lot - though I seem to remember that we, for example, first
crossed swords when I wasn't having my best day.

> Of course the FAQ itself would have to be vetted by the group, so it truly
> represents a consensus.  A good FAQ is a non-trivial amount of work.  Any
> volunteers?
>
I did once consider doing some serious work to bring the FAQ up to date, but
I seem to remember the BDFL made some dismissive remark along the lines of
"nobody reads FAQs any more". I may be misrepresenting him, but since he
probably won't read this what the hell do I care ;-). One major problem is
the AutoFAQ's careless habit of dropping articles into the section int he
order of submission.

We might make a good team for that task ...

> Finally, there's the issue of once taboo topics that become language
> features.  If "bool" had been listed as a taboo topic perhaps the
> corresponding PEP would never have been written (for better or worse,
> depending on your viewpoint).  But collisions such as this probably
doesn't
> happen frequently enough to be a concern.
>
Well this wasn't a taboo topic. It was a feature enhancement that Guido
should have just put in without asking for permission, given the degree of
sound and fury the proposal elicited. Frankly I'd be happy if we could just
all find the self-discipline to only post once on such topics. Interestingly
Guido recently mentioned on python-dev that you can do

    True.__class__ = int

and get the "correct" integer representations for Boolean results. I thought
that was rather neat. Now, what were we disagreeing about?

too-faq'd-out-to-be-bothered-ly y'rs  - steve
--

Steve Holden: http://www.holdenweb.com/ ; Python Web Programming:
http://pydish.holdenweb.com/pwp/








More information about the Python-list mailing list