Advance Python Programming with Meta class and Design Pattern | 3 ways of creating class #3

preview_player
Показать описание
thanks for love
Рекомендации по теме
Комментарии
Автор

This is lierally something new :)
Thanks, Great Job.

multiaseem
Автор

Dude, you should delete these videos or fix them. You are teaching the wrong concepts here. Imagine someone who doesn't know about these concepts and learning from your videos. It will only do harm to them.

vasupal_
Автор

Second method of creation is wrong. Your dunder call never gets executed. dunder call is used for making an instance of class behave like how we call functions.
b = B() # This uses object class dunder init method to create instance
b() # This will call your dunder call method that you have defined. This looks like a normal function call as far as syntax is concerned.

malleshk
Автор

Hi,

What are the correct method. Please tell here. For 2 approch __call__ in never called.

Perfect_soul__
Автор

The second method is wrong.The __call__ is never being called.The class gets created as the default __init__ is provided by python.__call__ is only called if object is called as a function i.e B()()

vksingh