File tree 2 files changed +7
-7
lines changed
2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 5
5
class A :
6
6
def __init__ (self ):
7
7
super ().__init__ ()
8
- self .foo = "foo "
8
+ self .prop1 = "prop1 "
9
9
self .name = "Class A"
10
10
11
11
12
12
class B :
13
13
def __init__ (self ):
14
14
super ().__init__ ()
15
- self .bar = "bar "
15
+ self .prop2 = "prop2 "
16
16
self .name = "Class B"
17
17
18
18
@@ -21,12 +21,12 @@ def __init__(self):
21
21
super ().__init__ ()
22
22
23
23
def showprops (self ):
24
- print (self .foo )
25
- print (self .bar )
24
+ print (self .prop1 )
25
+ print (self .prop2 )
26
26
print (self .name )
27
27
28
28
29
- # create the class and call showname ()
29
+ # create the class and call showprops ()
30
30
c = C ()
31
31
print (C .__mro__ )
32
32
c .showprops ()
Original file line number Diff line number Diff line change 5
5
class A :
6
6
def __init__ (self ):
7
7
super ().__init__ ()
8
- self .foo = "foo "
8
+ self .prop1 = "prop1 "
9
9
10
10
11
11
class B :
12
12
def __init__ (self ):
13
13
super ().__init__ ()
14
- self .bar = "bar "
14
+ self .prop2 = "prop2 "
15
15
16
16
17
17
class C (A , B ):
You can’t perform that action at this time.
0 commit comments