[issue30941] Missing line in example program

New submission from Luc Bougé: 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
---------- assignee: docs@python components: Documentation messages: 298445 nosy: docs@python, lucbouge priority: normal severity: normal status: open title: Missing line in example program type: resource usage versions: Python 3.6 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue30941> _______________________________________

R. David Murray added the comment: 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). ---------- nosy: +r.david.murray resolution: -> not a bug stage: -> resolved status: open -> closed type: resource usage -> behavior _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue30941> _______________________________________
participants (2)
-
Luc Bougé
-
R. David Murray