什么是类
对象是类的具体实例
类是对象的模子
class 类名:
方法列表
创建对象
对象名 = 类名()

isinstance方法()

init方法()

使用方法
def 类名:
def init():
pass
init()的方法调用

del的方法
当删除一个对象时,python解释器也会默认调用一个方法
new的方法

捕捉异常
捕捉异常try...except

捕捉多个异常

捕捉所有异常


模块
在python中用关键字import来引入某个模块
1.from...import
2.from...import *
3.as
魔法
打印id()

定义str方法

网友评论