Skip to content

Commit 072f014

Browse files
committed
classmethod
1 parent 8879230 commit 072f014

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ In [1]: ord('A')
303303
Out[1]: 65
304304
```
305305

306-
#### 14 静态方法 
306+
#### 14 类方法 
307307

308308
`classmethod` 装饰器对应的函数不需要实例化,不需要 `self `参数,但第一个参数需要是表示自身类的 cls 参数,可以来调用类的属性,类的方法,实例化对象等。
309309

0 commit comments

Comments
 (0)