Message230418
The "sequence" parameter name is an unfortunate hold-over from olden times were many things that accepted iterables were marked as taking sequences.
This was fixed in Python 3, but it can't be changed in Py2.7 because the parameter name is exposed as a keyword argument:
>>> list(enumerate(sequence='abc', start=2))
[(2, 'a'), (3, 'b'), (4, 'c')]
The rest docs for Python 2.7 read just fine, "Return an enumerate object. sequence must be a sequence, an iterator, or some other object which supports iteration." I think that is sufficient to clarify any confusion caused by the unfortunate choice of keyword argument name. |
|
Date |
User |
Action |
Args |
2014-11-01 01:04:22 | rhettinger | set | recipients:
+ rhettinger, georg.brandl, terry.reedy, ezio.melotti, r.david.murray, docs@python, ethan.furman, vy0123 |
2014-11-01 01:04:22 | rhettinger | set | messageid: <1414803862.16.0.552820399567.issue22725@psf.upfronthosting.co.za> |
2014-11-01 01:04:22 | rhettinger | link | issue22725 messages |
2014-11-01 01:04:22 | rhettinger | create | |
|