Skip to content

Commit 31fca5d

Browse files
authored
Update 01.@classmethod-(类方法)和-@staticmethod(静态方法).md
1 parent baad6cf commit 31fca5d

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

docs/01.@classmethod-(类方法)和-@staticmethod(静态方法).md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# 01.@classmethod-(类方法)和-@staticmethod(静态方法)
2+
13
定义一个时间类:
24
```
35
class Data_test(object):
@@ -66,12 +68,12 @@ day: 1
6668

6769
调用类方法的格式是:```类名.类方法()```,不需要先实例化。
6870

69-
---
71+
7072
<br>
71-
---
72-
---
73+
<hr>
7374
<br>
7475

76+
7577
如果用 静态方法 ```@staticmethod``` 怎么实现呢?
7678

7779
```

0 commit comments

Comments
 (0)