Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix typo #125

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 1 commit into from
Jul 25, 2016
Merged
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 @@ -131,7 +131,7 @@
而使用一个协程来作为一个回调函数就更有趣了,它跟闭包方法密切相关。
某种意义上来讲,它显得更加简洁,因为总共就一个函数而已。
并且,你可以很自由的修改变量而无需去使用 ``nonlocal`` 声明。
这种方式唯一缺点就是相对于其他Python技术而已或许比较难以理解
这种方式唯一缺点就是相对于其他Python技术而言或许比较难以理解
另外还有一些比较难懂的部分,比如使用之前需要调用 ``next()`` ,实际使用时这个步骤很容易被忘记。
尽管如此,协程还有其他用处,比如作为一个内联回调函数的定义(下一节会讲到)。

Expand Down