mirror of
https://github.com/python/cpython.git
synced 2026-02-13 19:04:37 +00:00
[3.11] Sync-up parameter name in equivalent code snippet of enumerate (GH-101029) (#101030)
Sync-up parameter name in equivalent code snippet of `enumerate` (GH-101029)
(cherry picked from commit ef633e5000)
Co-authored-by: JustAnotherArchivist <JustAnotherArchivist@users.noreply.github.com>
This commit is contained in:
parent
c7aa39286b
commit
6d98282ed4
1 changed files with 2 additions and 2 deletions
|
|
@ -504,9 +504,9 @@ are always available. They are listed here in alphabetical order.
|
|||
|
||||
Equivalent to::
|
||||
|
||||
def enumerate(sequence, start=0):
|
||||
def enumerate(iterable, start=0):
|
||||
n = start
|
||||
for elem in sequence:
|
||||
for elem in iterable:
|
||||
yield n, elem
|
||||
n += 1
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue