09-15-周一_15-47-09
This commit is contained in:
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
```python
|
```python
|
||||||
class A:
|
class A:
|
||||||
name = '陈松'
|
name = '张三'
|
||||||
|
|
||||||
# 第一部分:静态字段(静态变量)部分
|
# 第一部分:静态字段(静态变量)部分
|
||||||
|
|
||||||
@@ -23,7 +23,7 @@ class A:
|
|||||||
```python
|
```python
|
||||||
class A:
|
class A:
|
||||||
|
|
||||||
company_name = '陈松' # 静态变量(静态字段)
|
company_name = '张三' # 静态变量(静态字段)
|
||||||
__iphone = '132333xxxx' # 私有静态变量(私有静态字段)
|
__iphone = '132333xxxx' # 私有静态变量(私有静态字段)
|
||||||
|
|
||||||
def __init__(self,name,age): #特殊方法
|
def __init__(self,name,age): #特殊方法
|
||||||
|
Reference in New Issue
Block a user