[New-bugs-announce] [issue4703] Syntax error in sample code for enumerate in documentation.

Roger report at bugs.python.org
Sat Dec 20 04:08:10 CET 2008


New submission from Roger <rdcollum at gmail.com>:

Summary: Sample code for enumerate contains a syntax error. The same
code reads:

>>> for i, season in enumerate(['Spring', 'Summer', 'Fall', 'Winter')]:
...     print(i, season)

Where the parenthesis and square bracket to the left of the colon in the
for line are backwards.  It should read:

>>> for i, season in enumerate(['Spring', 'Summer', 'Fall', 'Winter']):

Where: http://docs.python.org/dev/3.0/library/functions.html

----------
assignee: georg.brandl
components: Documentation
messages: 78082
nosy: georg.brandl, trenholmes
severity: normal
status: open
title: Syntax error in sample code for enumerate in documentation.
versions: Python 3.0

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4703>
_______________________________________


More information about the New-bugs-announce mailing list