Singleton Design Pattern | Python Example

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

Dont know why this video has not more views. It is extremely straightforward, informative and clear.

antoniopena
Автор

Best explanation I've seen so far regarding Singleton Design in Python. Thanks so much!

roadtoenlightenment-wute
Автор

I have been studying this singleton pattern from last 3 days on the internet but none of them was explaining this that way.I must say this is the best way the singleton is explained on the internet kindly upload more design pattern. From india❤️

ankitpurshottam
Автор

I jumped from video to video trying to find one that explained clearly and finally, yours explained it clearly thanks!!!

Samoloh
Автор

That was stellar! I've been trying to implement a configuration class that reads a yaml file ONCE per application run without success. You provided all the missing pieces in an extremely easy to understand way! (liked and subscribed) 👍

sdmagic
Автор

best explanation i could search about singleton after searching all over youtube/google. thank you!

dendi
Автор

I have to admit, you real good explainer, you go on details. You know your what you know and there is no doubt about it. I wish you have all Python course module by module. Thanks so much.

kifeyabediru
Автор

Great video, man! Coming off Java, this topic was a little much to wrap my mind around. Also, probably the first thing that I've found that would be easier to do in Java than Python lol.

Thanks for the help!

matthewwheeler
Автор

'simple' but controversial - and even despised by some - pattern.
Excellent video and you gained a new subscriber.

ErikS-
Автор

Can't believe how clear you made this to understand!

jonathancarpenter
Автор

Thank you. At 13:00, why we need to call super class method to get back instance of Singleton class please? Can't we just do it without calling super(signleton, cls)?

mohammadyahya
Автор

I wish there are more design patterns in Python in this playlist!

Ragdoll-ql
Автор

Crystal clear explanation. I too like the second approach as it deals with general object class . Subscribed the channel 👍

vigneshr.
Автор

No words except THANK YOU! But disappointed you didn’t upload more design pattern videos 💔

elias
Автор

thanks for the video! could you please explain super(Singleton, cls).__new__. what is happening here? is the new method accesed from object? what does super(Singleton, cls) do in this context?

daniellesprinzak
Автор

in the second way, if I write the __init__ method then it is instantiating the object 2 times . how to avoid this also? although the __new__ referances to the same address, still __init__ instantiates two times

vaishnavi
Автор

Great video! Very good example and explanation about singleton, although there is something I’m struggling to understand: what’s the difference between the __new__ and __init__ methods and when should we use each one of them?

aritzfloresmonje
Автор

Thank You for your videos.
Please upload more videos on python design patterns if it's possible from your side.
Thank You 👍

Shashank_Shahi
Автор

What is there are two threads trying to create this object at the same time? Maybe both of them have checked __instance at the same time and found it to be None. Will it not create two different objects in this case?

mallikarjunrterdal
Автор

But it does not throw any exception if Singleton constructor is called for very first time instead of calling getInstance method, do we have any solution for this?

pavanjain
join shbcf.ru