bpo-30826: Improve control flow examples#15407
Conversation
terryjreedy
left a comment
There was a problem hiding this comment.
An improvement worth merging as is, with suggestions for maybe making it even better.
| inserting ``defenestrate`` over and over again. | ||
| Code that modifies a collection while iterating over that same collection can | ||
| be tricky to get right. Instead, it is usually more straight-forward to loop | ||
| over a copy of the collection or to create a new collection:: |
There was a problem hiding this comment.
The three lines are clearer and more correct in giving both strategies.
There was a problem hiding this comment.
You're happy with the proposed wording, correct?
There was a problem hiding this comment.
Yes. There is no checkbox for "(*) Approve either as is as a definite and acceptable improvement over the status quo or after possible further improvements based on my comments -- you decide."
In this case, you considered each suggestion and and gave a short coherent reason why not, one which I can consider when writing or reviewing other doc patches.
I appreciate you tackling some of these lingering doc issues which have seemingly been blocked by the quest for perfection even when improvement is clearly possible.
|
Thanks @rhettinger for the PR 🌮🎉.. I'm working now to backport this PR to: 3.8. |
(cherry picked from commit 6fcb6cf) Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
|
GH-15410 is a backport of this pull request to the 3.8 branch. |
https://bugs.python.org/issue30826