Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpo-30538: Update count() in Functional Programming HOWTO #1919

Merged
merged 2 commits into from
Jun 4, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
bpo-30538: Update enumerate() arguments in Functional HOWTO
  • Loading branch information
csabella committed Jun 3, 2017
commit 56955515e310417168b1141e2577f4bfdab78343
5 changes: 3 additions & 2 deletions Doc/howto/functional.rst
Original file line number Diff line number Diff line change
Expand Up @@ -653,8 +653,9 @@ This can also be written as a list comprehension:
[0, 2, 4, 6, 8]


:func:`enumerate(iter) <enumerate>` counts off the elements in the iterable,
returning 2-tuples containing the count and each element. ::
:func:`enumerate(iter, start=0) <enumerate>` counts off the elements in the
iterable returning 2-tuples containing the count (from *start*) and
each element. ::

>>> for item in enumerate(['subject', 'verb', 'object']):
... print(item)
Expand Down