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.

classification
Title: Missing line in documentation example
Type: behavior Stage: resolved
Components: Documentation Versions: Python 3.9
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: docs@python Nosy List: Luis Muñoz, docs@python, martin.panter
Priority: normal Keywords:

Created on 2019-03-30 07:59 by Luis Muñoz, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Messages (3)
msg339184 - (view) Author: Luis Muñoz (Luis Muñoz) Date: 2019-03-30 07:59
Hi,

https://docs.python.org/3/tutorial/controlflow.html#break-and-continue-statements-and-else-clauses-on-loops

The example is missing a break at the end of the else statement.

First time reporting here. If there is an error in formating or anything else please accept my apologies.

Luis Muñoz
msg339186 - (view) Author: Martin Panter (martin.panter) * (Python committer) Date: 2019-03-30 09:12
Did you read the bracketed paragraph directly below, or try running the code with your “break” statement? I expect it would stop at the first prime number (two). But the output continues with more prime numbers.
msg339196 - (view) Author: Luis Muñoz (Luis Muñoz) Date: 2019-03-30 13:12
My bad. 
Sorry for the inconvenience.
History
Date User Action Args
2022-04-11 14:59:13adminsetgithub: 80664
2019-03-30 13:12:53Luis Muñozsetmessages: + msg339196
2019-03-30 09:12:02martin.pantersetstatus: open -> closed

nosy: + martin.panter
messages: + msg339186

resolution: not a bug
stage: resolved
2019-03-30 07:59:38Luis Muñozcreate