This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Chas Belov
Recipients Chas Belov, docs@python
Date 2020-05-16.06:02:21
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1589608941.53.0.91951505263.issue40640@roundup.psfhosted.org>
In-reply-to
Content
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
History
Date User Action Args
2020-05-16 06:02:21Chas Belovsetrecipients: + Chas Belov, docs@python
2020-05-16 06:02:21Chas Belovsetmessageid: <1589608941.53.0.91951505263.issue40640@roundup.psfhosted.org>
2020-05-16 06:02:21Chas Belovlinkissue40640 messages
2020-05-16 06:02:21Chas Belovcreate