-
Notifications
You must be signed in to change notification settings - Fork 2k
Expand file tree
/
Copy pathtest.py
More file actions
66 lines (41 loc) · 1.06 KB
/
test.py
File metadata and controls
66 lines (41 loc) · 1.06 KB
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
class Base2(object):
def __init__(self):
super(Base2, self).__init__()
class Derived4(Base2):
def __init__(self):
super(Base2, self)
return super(Derived4, self).__init__()
class Base1(object):
def meth(self):
pass
class Derived1(Base1):
def meth(self):
return super(Derived1, self).meth()
class Derived2(Derived1):
def meth(self):
return super(Derived2, self).meth()
class Derived5(Derived1):
def meth(self):
return super(Derived5, self).meth()
#Incorrect use of super()
class Wrong1(Derived5, Derived2):
def meth(self):
return super(Derived5, self).meth()
#ODASA-5799
class DA(object):
def __init__(self):
do_something()
class DB(DA):
class DC(DA):
def __init__(self):
sup = super(DB.DC, self)
sup.__init__()
#Simpler variants
class DD(DA):
def __init__(self):
sup = super(DD, self)
sup.__init__()
class DE(DA):
class DF(DA):
def __init__(self):
super(DE.DF, self).__init__()