Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/dabeaz/python-cookbook
/ C
Class
C
src/8/calling_a_method_on_a_parent_class/example5.py:18–21 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
16
print(
'B.__init__'
)
17
18
class
C(A,B):
19
def
__init__(self):
20
super().__init__()
# Only one call to super() here
21
print(
'C.__init__'
)
22
23
if
__name__ ==
'__main__'
:
24
# Observe that each class initialized only once
Callers
1
example5.py
File · 0.70
Calls
no outgoing calls
Tested by
no test coverage detected