[New-bugs-announce] [issue46033] Duplicated sentence in for statement documentation

Michał D report at bugs.python.org
Fri Dec 10 05:42:42 EST 2021


New submission from Michał D <michcio1234 at gmail.com>:

In for statement description, there seem to be two sentences meant to mean the same:

> The suite is then executed once for each item provided by the iterator, in the order returned by the iterator. Each item in turn is assigned to the target list using the standard rules for assignments (see Assignment statements), and then the suite is executed.

(from https://docs.python.org/3/reference/compound_stmts.html#the-for-statement)

I believe only one of these sentences should be kept (probably the second one).

If I am wrong, and the current version is actually correct, then it is unclear - to me it sounds like the iterator is iterated through twice, and suite is executed twice for each item.

----------
assignee: docs at python
components: Documentation
messages: 408189
nosy: docs at python, michcio1234
priority: normal
severity: normal
status: open
title: Duplicated sentence in for statement documentation
versions: Python 3.10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue46033>
_______________________________________


More information about the New-bugs-announce mailing list