学习笔记
Renio
New Star
展开
-
Python type创建类遇到的一个小问题
Python一切皆对象 class foo: def su(self,a,b): return a+b obj = foo() print(foo,type(foo)) #<class '__main__.foo'>,<class 'type'> print(foo()) #<__main__.foo ob...原创 2020-02-29 23:31:29 · 108 阅读 · 0 评论 -
学习笔记(Python继承)
学习笔记(Python继承) 有几种叫法(父类-子类、基类-派生类) 先拿代码演示一下: class father: def work(self): print("work>>>>>") def car(self): print("car>>>>>>>>>") c...转载 2020-02-27 00:59:51 · 107 阅读 · 0 评论