-
Notifications
You must be signed in to change notification settings - Fork 0
/
mro_practice.py
43 lines (33 loc) · 1.03 KB
/
mro_practice.py
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
35
36
37
38
39
40
41
42
43
import time
from tkinter import Tk, Frame
# https://stackoverflow.com/questions/10482953/python-extending-with-using-super-python-3-vs-python-2
class A:
def __init__(self, *args, **kwargs):
print('A')
super().__init__() # comment/uncomment
class B(A):
def __init__(self, *args, **kwargs):
print('B')
super().__init__() # comment/uncomment
# while True:
# print('stucked in B')
# time.sleep(2)
class X:
def __init__(self, *args, **kwargs):
print('X')
# super().__init__()
# class Forward(list, Frame, B, X):
# class Forward(Frame, B, X):
class Forward(B, X):
def __init__(self, master):
print('Forward')
# super().__init__()
# super().__init__(master())
B.__init__(self)
# super().__init__(master())
class Backward(X, B):
def __init__(self):
print('Backward')
super().__init__()
some = Forward(master=Tk)
# thing = Backward()