[python_by_example] While-loop description inverts the loop condition

Offen Anfängerfreundlich
#599 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
1/5
Geschätzter Aufwand
Unter einer Stunde
Anfängerfreundlichkeit
92/100
Issue-Typ
Dokumentation
Klarheit
Klar beschrieben
Aktivitätsstatus
Ruhig
Tech-Stack
python
Bereich
documentation

Rechercherichtung

Öffne python_by_example.md und finde den Abschnitt „While loops“. Ersetze die invertierte Beschreibung so, dass sie besagt, dass der Block ausgeführt wird, solange die Bedingung (i < ts_length) wahr ist, überprüfe anschließend den folgenden Satz auf eine konsistente Formulierung und sieh dir die gerenderte Dokumentation an.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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.

Vorherrschende Sprache
JavaScript
Sterne
72
Forks
31
Ø Merge
2 T. 20 Std.
Gemergte PRs (30 T.)
8

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus QuantEcon/lecture-python-programming

Alle Issues in QuantEcon/lecture-python-programming

Ähnliche Issues

Weitere Issues zu JavaScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.