MCPcopy Create free account
hub / github.com/CodeWithHarry/The-Ultimate-Python-Course / __init__

Method __init__

Chapter 10/04_constructor.py:5–9  ·  view source on GitHub ↗
(self, name, salary, language)

Source from the content-addressed store, hash-verified

3 salary = 1200000
4
5 def __init__(self, name, salary, language): # dunder method which is automatically called
6 self.name = name
7 self.salary = salary
8 self.language = language
9 print("I am creating an object")
10
11
12 def getInfo(self):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected