0

What is magic method of creating instance?

6th Jan 2017, 3:37 PM
Dhinesh Prabhu
Dhinesh Prabhu - avatar
14 odpowiedzi
+ 6
__init__
1st Jul 2018, 4:00 AM
RISHABH GUPTA
RISHABH GUPTA - avatar
+ 2
__init__
2nd Aug 2020, 3:55 PM
Sandeep Rajani
+ 1
When creating an instance, the magic method use is __new__. But to instantiate the object, you need to use __init__
6th Jan 2017, 11:01 PM
Amaras A
Amaras A - avatar
0
thanks for the guidance
8th Jan 2017, 10:18 AM
Dhinesh Prabhu
Dhinesh Prabhu - avatar
0
good answer
15th Jan 2017, 4:25 PM
Dhinesh Prabhu
Dhinesh Prabhu - avatar
0
@nemcaninz: that's double underscore, not single. That's also why they are called dunder methods
4th Feb 2017, 2:51 PM
Amaras A
Amaras A - avatar
0
__init__
25th Aug 2019, 4:04 AM
Siva Ravuri
Siva Ravuri - avatar
0
https://youtu.be/Tg4Du8eUFw8 full python video tutorial link in youtub
8th Jul 2020, 11:18 AM
Kailash Singh
Kailash Singh - avatar
0
__init__
4th Nov 2020, 5:58 PM
dammika rajapaksha
dammika rajapaksha - avatar
0
__init__
5th Dec 2020, 12:21 PM
Hafiz Ramadhan
Hafiz Ramadhan - avatar
0
What is the magic method for creating an instance? __init__
21st Jan 2021, 2:45 PM
Syed Fahad Ahmed
Syed Fahad Ahmed - avatar
0
What is the magic method for creating an instance? answer : __init__
7th Jun 2021, 11:12 AM
Madhavareddy
Madhavareddy - avatar
- 1
To instantiate the object you have to use _new_. To initiate the object you have to use _init_
4th Feb 2017, 1:41 PM
Zarko Nemcanin
- 3
_new_
9th Feb 2017, 1:40 AM
Sim Wafa Onik
Sim Wafa Onik - avatar