This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author r.david.murray
Recipients docs@python, ethan.furman, ezio.melotti, georg.brandl, r.david.murray, vy0123
Date 2014-10-25.15:06:57
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1414249618.9.0.459941502887.issue22725@psf.upfronthosting.co.za>
In-reply-to
Content
I think you misunderstand the purpose of the documentation you are suggesting modifying.  It is a *reference guide*, and as such it needs to be technically precise and *must* correctly use the "jargon" of the language.  Especially since it also functions as the reference guide for people who implement new versions of Python, and need to know what behavior of things like 'enumerate' they need to reproduce.

That said, we also prefer the reference docs to be clear and understandable to someone who is a relative beginner, as long as we don't lose precision in doing so.  Thus the glossary and the glossary links, so yes it would be a good idea to add those.

I did indeed misspell iterable.

Your sentence is still incorrect...items returned by an iterator do not necessarily have an index (that is, you can't say myiterator[3] in the general case).

So, if I understand correctly, your difficulty was the confusion between the argument name *sequence* and the technical term ``sequence`` (referring to a Python object type).  I agree that that makes things confusing.  It would be better if the argument were named *iterable*, but we can't really change it at this point for backward compatibility reasons.

Maybe if we rearrange things a bit we can make it clearer.  How about this:

Return an enumerate object which when iterated[link to glossary] yields a two-tuple for each element in *sequence*, each tuple consisting of the sequence number of the element (beginning with *start*, which defaults to 0) paired with the element itself.  *sequence* must be a sequence, an iterator, or some other object which supports iteration.

That moves the distracting precise definition of *sequence* to the end, after you've already grasped what the function does.  You will note that I've also dropped the reference to next; that is implicit in the mention of "when iterated", since it is an integral part of the iteration protocol. IMO it is a distraction to mention next in this context.  It confuses the beginner and isn't needed by the expert.
History
Date User Action Args
2014-10-25 15:06:58r.david.murraysetrecipients: + r.david.murray, georg.brandl, ezio.melotti, docs@python, ethan.furman, vy0123
2014-10-25 15:06:58r.david.murraysetmessageid: <1414249618.9.0.459941502887.issue22725@psf.upfronthosting.co.za>
2014-10-25 15:06:58r.david.murraylinkissue22725 messages
2014-10-25 15:06:57r.david.murraycreate