QuantEcon / QuantEcon/lecture-python-programming

[python_by_example] While-loop description inverts the loop condition

未关闭 适合新手
#599 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
JavaScript
星标
72
派生
31
平均合并
2 天 20 小时
30 天内合并 PR
8

描述

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.

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

打开 python_by_example.md 并找到“While loops”部分。替换其中颠倒的描述,使其说明只要条件 (i < ts_length) 为真,代码块就会运行,然后检查后面的句子以确保措辞一致,并查看渲染后的文档。

由索引模型根据 Issue 内容生成。

评估

技术栈
python
领域
documentation
Issue 类型
文档
难度
1/5
预计耗时
1 小时以内
活跃度
冷清
描述清晰度
描述清楚
新手友好度
92/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。