[New-bugs-announce] [issue40640] Tutorial for Continue missing ... line
Chas Belov
report at bugs.python.org
Sat May 16 02:02:21 EDT 2020
New submission from Chas Belov <docorbit at sonic.net>:
The tutorial code for Continue at https://docs.python.org/3.7/tutorial/controlflow.html#break-and-continue-statements-and-else-clauses-on-loops is missing a
...
null statement.
Actual code/result:
>>> for num in range(2, 10):
... if num % 2 == 0:
... print("Found an even number", num)
... continue
... print("Found a number", num)
Found an even number 2
Found a number 3
Found an even number 4
Found a number 5
Found an even number 6
Found a number 7
Found an even number 8
Found a number 9
Expected code/result:
>>> for num in range(2, 10):
... if num % 2 == 0:
... print("Found an even number", num)
... continue
... print("Found a number", num)
...
Found an even number 2
Found a number 3
Found an even number 4
Found a number 5
Found an even number 6
Found a number 7
Found an even number 8
Found a number 9
----------
assignee: docs at python
components: Documentation
messages: 369014
nosy: docorbit at sonic.net, docs at python
priority: normal
severity: normal
status: open
title: Tutorial for Continue missing ... line
versions: Python 3.7
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40640>
_______________________________________
More information about the New-bugs-announce
mailing list