You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[python_by_example] While-loop description inverts the loop condition #599
In the "While loops" section, python_by_example.md currently reads:
A while loop will keep executing the code block delimited by indentation until the condition (i < ts_length) is satisfied.
The logic is inverted: a while loop executes the block while the condition is true, and stops once it fails. As written, "until the condition is satisfied" describes a loop that runs while i < ts_length is false.
Suggested wording:
A while loop will keep executing the code block delimited by indentation as long as the condition (i < ts_length) is true.
This matches the sentence that follows ("the program will keep adding values to the list until i equals ts_length"), which is stated correctly.
Found during native-editor review of the French edition — the machine translation had faithfully reproduced the inverted sentence, and the editor corrected it target-side in QuantEcon/lecture-python-programming.fr#25. Until it is corrected here, the French edition deliberately diverges from the source on this sentence. Same discovery path as #594.
The inverted sentence was corrected in #604 (merged 2026-08-05, aacff38): lectures/python_by_example.md line 386 now reads "A while loop will keep executing the code block delimited by indentation as long as the condition (i < ts_length) is satisfied." #604 referenced #602 only, so this issue stayed open. Closing as completed.
Activity
mmcky commentedon Sep 23, 2026
The inverted sentence was corrected in #604 (merged 2026-08-05,
aacff38):lectures/python_by_example.mdline 386 now reads "A while loop will keep executing the code block delimited by indentation as long as the condition (i < ts_length) is satisfied." #604 referenced #602 only, so this issue stayed open. Closing as completed.