The MAGIC method in Python

preview_player
Показать описание


🎞 Video Resources 🎞

⏳ Timestamps ⏳

Hashtags
Рекомендации по теме
Комментарии
Автор

Like your videos, Tim. Get me right, please. But there's a mistake again. As __init__ - is not a "constructor".

__new__ is the constructor in Python because it actually creates a new instance of a class. It returns the new object.

__init__ is the initializer because it initializes the instance after it has been created. It doesn’t return anything (only modifies the instance).

So, __new__ constructs, and __init__ initializes. 🚀

samoylov
Автор

You explained that better than my computer science teacher

wanderings
welcome to shbcf.ru