-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathtest.py
More file actions
34 lines (25 loc) · 644 Bytes
/
Copy pathtest.py
File metadata and controls
34 lines (25 loc) · 644 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
from typing import Callable
class Father:
def __init__(self, choose_dir: str):
print(choose_dir)
self.choose_dir = choose_dir
def choose(self, val):
print(val)
class Son(Father):
def __init__(self, d):
super().__init__(d)
def execute(self):
f = Father("ddd")
def swap():
pass
if __name__ == '__main__':
son = Son('dd')
son.choose('a')
print(type(swap))
print(isinstance(son, Son))
print(isinstance(swap, Callable))
print(isinstance(son.choose, Callable))
print(callable(son.choose))
print(type(son))
print(type(Son))
print(type(type))