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

Missing line in example program #75124

Closed
lucbouge mannequin opened this issue Jul 16, 2017 · 2 comments
Closed

Missing line in example program #75124

lucbouge mannequin opened this issue Jul 16, 2017 · 2 comments
Labels
docs Documentation in the Doc dir type-bug An unexpected behavior, bug, or error

Comments

@lucbouge
Copy link
Mannequin

lucbouge mannequin commented Jul 16, 2017

BPO 30941
Nosy @bitdancer, @lucbouge

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 = None
closed_at = <Date 2017-07-16.19:33:16.579>
created_at = <Date 2017-07-16.18:24:33.397>
labels = ['type-bug', 'invalid', 'docs']
title = 'Missing line in example program'
updated_at = <Date 2017-07-16.19:33:16.577>
user = 'https://github.com/lucbouge'

bugs.python.org fields:

activity = <Date 2017-07-16.19:33:16.577>
actor = 'r.david.murray'
assignee = 'docs@python'
closed = True
closed_date = <Date 2017-07-16.19:33:16.579>
closer = 'r.david.murray'
components = ['Documentation']
creation = <Date 2017-07-16.18:24:33.397>
creator = 'lucbouge'
dependencies = []
files = []
hgrepos = []
issue_num = 30941
keywords = []
message_count = 2.0
messages = ['298445', '298447']
nosy_count = 3.0
nosy_names = ['r.david.murray', 'docs@python', 'lucbouge']
pr_nums = []
priority = 'normal'
resolution = 'not a bug'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue30941'
versions = ['Python 3.6']

@lucbouge
Copy link
Mannequin Author

lucbouge mannequin commented Jul 16, 2017

On page <https://docs.python.org/3.6/_sources/library/stdtypes.txt\>, the following program is listed.

It raises a syntactic error.

An empty line is missing after "... n += val" to close the loop body.

   >>> # iteration
   >>> n = 0
   >>> for val in values:
   ...     n += val
   >>> print(n)
   504

@lucbouge lucbouge mannequin added the performance Performance or resource usage label Jul 16, 2017
@lucbouge lucbouge mannequin assigned docspython Jul 16, 2017
@lucbouge lucbouge mannequin added the docs Documentation in the Doc dir label Jul 16, 2017
@bitdancer
Copy link
Member

This is the standard way that we write examples. Sprinkling in extra blank lines everywhere would make the examples less readable. One you've learned how the command interpreter works, the examples are clear, so you each beginner only has to learn this once (and I believe it is explained in the tutorial, though I haven't checked).

@bitdancer bitdancer added invalid type-bug An unexpected behavior, bug, or error and removed performance Performance or resource usage labels Jul 16, 2017
@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 type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

1 participant