
廖雪峰的博客
空零kl
低头靠勇气,抬头靠实力
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
类 https://www.cnblogs.com/wangmo/p/7751199.html
class Person: #定义一个人类 role = 'person' #人的角色属性都是人 def walk(self): #人都可以走路,也就是有一个走路方法 print("person is walking...")print(Person.role) #查看人的role属性print(Person.walk) #引用人的走路方法,注意...原创 2019-05-24 20:33:31 · 273 阅读 · 0 评论 -
通俗理解“回调函数”
我们先来看看回调的英文定义:A callback is a function that is passed as an argument to another function and is executed after its parent function has completed。字面上的理解,回调函数就是一个参数,将这个函数作为参数传到另一个函数里面,当那个函数执行完之后,再执行传进...转载 2019-05-24 20:20:19 · 311 阅读 · 0 评论