mirror of
https://github.com/apachecn/ailearning.git
synced 2026-04-27 03:52:23 +08:00
2020-10-19 21:08:55
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
|
||||
In [1]:
|
||||
|
||||
```
|
||||
```py
|
||||
class MyClass(object):
|
||||
def __init__(self):
|
||||
print "I'm special!"
|
||||
@@ -22,36 +22,36 @@ class MyClass(object):
|
||||
|
||||
In [2]:
|
||||
|
||||
```
|
||||
```py
|
||||
m = MyClass()
|
||||
|
||||
```
|
||||
|
||||
```
|
||||
```py
|
||||
I'm special!
|
||||
|
||||
```
|
||||
|
||||
In [3]:
|
||||
|
||||
```
|
||||
```py
|
||||
m.public()
|
||||
|
||||
```
|
||||
|
||||
```
|
||||
```py
|
||||
I'm public!
|
||||
|
||||
```
|
||||
|
||||
In [4]:
|
||||
|
||||
```
|
||||
```py
|
||||
m._private()
|
||||
|
||||
```
|
||||
|
||||
```
|
||||
```py
|
||||
I'm private!
|
||||
|
||||
```
|
||||
@@ -60,12 +60,12 @@ I'm private!
|
||||
|
||||
In [5]:
|
||||
|
||||
```
|
||||
```py
|
||||
m._MyClass__really_special()
|
||||
|
||||
```
|
||||
|
||||
```
|
||||
```py
|
||||
I'm really special!
|
||||
|
||||
```
|
||||
Reference in New Issue
Block a user