Thread by Jaydeep Karale
- Tweet
- Nov 26, 2022
- #ComputerProgramming
Thread
The `__init__` method in 🐍 Python is commonly confused to be a constructor. Is this really true though ?
Let's find out in today's 🧵🧵🧵
Let's find out in today's 🧵🧵🧵
🔶Firstly, what is a constructor ?
✅ A constructor is a special method of a class or structure in object-oriented programming that initializes a newly created object of that type.
✅ Whenever an object is created, the constructor is called automatically
✅ A constructor is a special method of a class or structure in object-oriented programming that initializes a newly created object of that type.
✅ Whenever an object is created, the constructor is called automatically
✅ The __init__ behaves differently however.
✅ It receives an already initialized instance of a class `hence the keyword self` is passed as an argument to the method.
✅ It receives an already initialized instance of a class `hence the keyword self` is passed as an argument to the method.
Hello 👋
I am Jaydeep from India 🇮🇳
Full time Software Engineer & part time content creator on
🐦Twitter
🖧 Linkedin
🎥YouTube
Follow me for content on
🐍 Python
🤖Ai/ML
🎨Data Visualization
🌟Content creation
Subscribe To My YouTube🔽
youtu.be/aYO9gmdTWB4
I am Jaydeep from India 🇮🇳
Full time Software Engineer & part time content creator on
🎥YouTube
Follow me for content on
🐍 Python
🤖Ai/ML
🎨Data Visualization
🌟Content creation
Subscribe To My YouTube🔽
youtu.be/aYO9gmdTWB4
Mentions
See All
Afiz ⚡️ @itsafiz
·
Nov 26, 2022
Great Explanation 🔥


