Issue 4703: Syntax error in sample code for enumerate in documentation. (original) (raw)

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