Skip to content

Fix typo in 9.10 and 7.3 #162

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 24, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@ python解释器不会对这些注解添加任何的语义。它们不会被类

尽管注解的使用方法可能有很多种,但是它们的主要用途还是文档。
因为python并没有类型声明,通常来讲仅仅通过阅读源码很难知道应该传递什么样的参数给这个函数。
这时候使用注解就能给程序员更多的提示,让他们可以争取的使用函数
这时候使用注解就能给程序员更多的提示,让他们可以正确的使用函数

参考9.20小节的一个更加高级的例子,演示了如何利用注解来实现多分派(比如重载函数)。
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
while n > 0:
n -= 1

那么你调用这个镜头方法时就会报错
那么你调用这个静态方法时就会报错

.. code-block:: python

Expand Down