summaryrefslogtreecommitdiffhomepage
path: root/zh-cn
diff options
context:
space:
mode:
authorChuckie Chen <chuckie_chen945@163.com>2022-07-29 15:16:13 +0800
committerGitHub <noreply@github.com>2022-07-29 15:16:13 +0800
commit9852ea8856e527a078345b346f25eaaf88f1e14f (patch)
tree61122adc81a42cd1b12ebef846bd2495d585db92 /zh-cn
parent11a4293061f95b4aaaceb186e42142580dbafd38 (diff)
[python/zh-cn] correct mistakes 勘误 (#4468)
* [python/zh-cn] fix typo 修正打字错误 我们可以通过遍历还访问所有的值 -> 我们还可以通过遍历访问所有的值 * add missing character 添加遗漏的字符 这个 math.p 文件会被代替引入 -> 这个 math.py 文件会被代替引入 * fix typo
Diffstat (limited to 'zh-cn')
-rw-r--r--zh-cn/python-cn.html.markdown6
1 files changed, 3 insertions, 3 deletions
diff --git a/zh-cn/python-cn.html.markdown b/zh-cn/python-cn.html.markdown
index a4e53c1b..127f7ad5 100644
--- a/zh-cn/python-cn.html.markdown
+++ b/zh-cn/python-cn.html.markdown
@@ -552,7 +552,7 @@ next(our_iterator) # => "three"
# 当迭代器所有元素都取出后,会抛出 StopIteration
next(our_iterator) # 抛出 StopIteration
-# 我们可以通过遍历还访问所有的值,实际上,for 内部实现了迭代
+# 我们还可以通过遍历访问所有的值,实际上,for 内部实现了迭代
our_iterator = iter(our_iterable)
for i in our_iterator:
print(i) # 依次打印 one, two, three
@@ -697,7 +697,7 @@ import math
dir(math)
# 当你的脚本文件所在的文件夹也包含了一个名为 math.py 的 Python 文件
-# 这个 math.p 文件会被代替引入,而不是引入 Python 內建模块中的 math
+# 这个 math.py 文件会被代替引入,而不是引入 Python 內建模块中的 math
# 出现这个情况的原因是本地文件夹的引入优先级要比 Python 內建库引入优先级要高
@@ -760,7 +760,7 @@ class Human:
del self._age
# 当 Python 解释器在读取源文件的时候,就会执行文件中所有的代码
-# 对 __name__ 的检查可以保证这块代码只会在执行这个模块是住程序情况下被运行(而不是在引用时运行)
+# 对 __name__ 的检查可以保证这块代码只会在这个模块是主程序的情况下被运行(而不是在引用时运行)
if __name__ == '__main__':
#
i = Human(name="Ian")