Commit 8c8fdbe
fix: 同步 learn-py.org 内容审查发现的 4 处教学错误(unichr / int 转换笔误 / f-string 基础缺失 / pathlib 错误输出)
- Type_conversion.md:删 Python 3 不存在的 unichr 表格行(实跑 NameError);修笔误「小数形式的字符串不能强转为字符串」→「不能用 int() 强转为整数」
- Type_of_data.md:f-string 节开头补基础语法讲解——原文「前面咱们已经在代码里看到过」不成立(本文前文与 python0/python1 均无 f-string,基础语法从未正式教过);节标题相应改为「f-string:把变量嵌进字符串」
- python18/1.md:p3 = 'foo' / Path('/tmp') 声称输出 /tmp/foo,实测输出 /tmp(右侧绝对路径会重置拼接前缀)——示例改用 Path('tmp'),输出 foo/tmp 与文本一致
同批修复已先行应用于 python-lab(learn-py.org)并上线。验证:example_runner 跑 python2+python18 两章 89 块,3 个失败经干净树对照确认为预先存在、与本次无关
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VvNQURTu9tDQzmHvE9rGGZ1 parent 9177bb9 commit 8c8fdbe
3 files changed
Lines changed: 22 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
130 | | - | |
| 130 | + | |
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
| |||
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
142 | | - | |
| 142 | + | |
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | 16 | | |
18 | 17 | | |
19 | 18 | | |
| |||
56 | 55 | | |
57 | 56 | | |
58 | 57 | | |
59 | | - | |
| 58 | + | |
60 | 59 | | |
61 | 60 | | |
62 | 61 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
294 | 294 | | |
295 | 295 | | |
296 | 296 | | |
297 | | - | |
| 297 | + | |
298 | 298 | | |
299 | | - | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
300 | 317 | | |
301 | 318 | | |
302 | 319 | | |
| |||
0 commit comments