mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
Confirm that the prime example is actually correct. We get so many complaints about a "buggy example" on docs@python, let us hope this cuts them in half at least.
This commit is contained in:
parent
db79e95195
commit
bdbdfb1978
1 changed files with 3 additions and 0 deletions
|
@ -184,6 +184,9 @@ following loop, which searches for prime numbers::
|
|||
8 equals 2 * 4
|
||||
9 equals 3 * 3
|
||||
|
||||
(Yes, this is the correct code. Look closely: the ``else`` clause belongs to
|
||||
the :keyword:`for` loop, **not** the :keyword:`if` statement.)
|
||||
|
||||
|
||||
.. _tut-pass:
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue