[Python-Dev] an oddball alternative name for enumerate()
Greg Ewing
greg@cosc.canterbury.ac.nz
Tue, 30 Apr 2002 16:10:23 +1200 (NZST)
Michael McLay <mclay@nist.gov>:
> Unfortunately the PEP has rejected all varations of the term index:
>
> All of the names involving 'index' clashed with usage in database
> languages where indexing implies a sorting operation rather than
> linear sequencing.
I think that comment is badly worded. Creating a database
index may involve sorting at some point, but that's irrelevant.
It's called "indexing" by analogy with indexing a book -- i.e.
creating a data structure allowing fast access to a data item
given a key. I think this usage of the term is much more widely
understood than just in the database field, or even the whole
computer field.
> I searched the Python document, using Thomas Heller's nifty "Index for
> Python manuals".
Why do you think that document has the word "Index" in its
title... :-)
Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury, | A citizen of NewZealandCorp, a |
Christchurch, New Zealand | wholly-owned subsidiary of USA Inc. |
greg@cosc.canterbury.ac.nz +--------------------------------------+