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

Syntax error in sample code for enumerate in documentation. #48953

Closed
trenholmes mannequin opened this issue Dec 20, 2008 · 2 comments
Closed

Syntax error in sample code for enumerate in documentation. #48953

trenholmes mannequin opened this issue Dec 20, 2008 · 2 comments
Assignees
Labels
docs Documentation in the Doc dir

Comments

@trenholmes
Copy link
Mannequin

trenholmes mannequin commented Dec 20, 2008

BPO 4703
Nosy @birkenfeld, @benjaminp

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = 'https://github.com/birkenfeld'
closed_at = <Date 2008-12-20.03:20:37.064>
created_at = <Date 2008-12-20.03:08:09.462>
labels = ['docs']
title = 'Syntax error in sample code for enumerate in documentation.'
updated_at = <Date 2008-12-20.03:20:37.019>
user = 'https://bugs.python.org/trenholmes'

bugs.python.org fields:

activity = <Date 2008-12-20.03:20:37.019>
actor = 'benjamin.peterson'
assignee = 'georg.brandl'
closed = True
closed_date = <Date 2008-12-20.03:20:37.064>
closer = 'benjamin.peterson'
components = ['Documentation']
creation = <Date 2008-12-20.03:08:09.462>
creator = 'trenholmes'
dependencies = []
files = []
hgrepos = []
issue_num = 4703
keywords = []
message_count = 2.0
messages = ['78082', '78083']
nosy_count = 3.0
nosy_names = ['georg.brandl', 'benjamin.peterson', 'trenholmes']
pr_nums = []
priority = 'normal'
resolution = 'fixed'
stage = None
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue4703'
versions = ['Python 3.0']

@trenholmes
Copy link
Mannequin Author

trenholmes mannequin commented Dec 20, 2008

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

@trenholmes trenholmes mannequin assigned birkenfeld Dec 20, 2008
@trenholmes trenholmes mannequin added the docs Documentation in the Doc dir label Dec 20, 2008
@benjaminp
Copy link
Contributor

Thanks for the report! Fixed in r67865.

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir
Projects
None yet
Development

No branches or pull requests

2 participants