Author vy0123
Recipients docs@python, ezio.melotti, r.david.murray, vy0123
Date 2014-10-25.06:11:30
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1414217491.36.0.230773462394.issue22725@psf.upfronthosting.co.za>
In-reply-to
Content
I don't want to argue. Ask a 12-year old and their English teacher, "Does the second sentence qualify as gobbledygook even if it is technically correct and complete and not verbose?"

To be constructive and take on what has been said, an iteration on improving the wording: 

-- improve wording as follows:

enumerate(iteratable, start=0)

Accepts an iteratable[typo for iterable?] and returns an iterator, a special case 'enumerate object'. The method iterator.next() returns a tuple which pairs an index counter with the object at the index in iterable.

>>> led = ['red', 'green', 'blue']
led = ['red', 'green', 'blue']
>>> iter = enumerate(led)
iter = enumerate(led)
>>> iter.next()
iter.next()
(0, 'red')
>>> iter.next()
iter.next()
(1, 'green')
>>> iter.next()
iter.next()
(2, 'blue')

# While enumerate does not return a list of pairs, 
# it is easy to collect the pairs and construct a list as follows
>>> list(enumerate(led))
list(enumerate(led))
[(0, 'red'), (1, 'green'), (2, 'blue')]
History
Date User Action Args
2014-10-25 06:11:31vy0123setrecipients: + vy0123, ezio.melotti, r.david.murray, docs@python
2014-10-25 06:11:31vy0123setmessageid: <1414217491.36.0.230773462394.issue22725@psf.upfronthosting.co.za>
2014-10-25 06:11:31vy0123linkissue22725 messages
2014-10-25 06:11:30vy0123create