super() explained in 5 minutes

preview_player
Показать описание
Over the next five minutes, we'll be covering what might be Python's most poorly understood feature: super()

This could be the most productive five minutes of your day!

Be sure to like and subscribe if you enjoyed this tutorial.
Рекомендации по теме
Комментарии
Автор

If you've found this useful in anyway, I'd really appreciate sharing it where you can so that more people can enjoy this resource! Watch out for a personal video I'm making on my own journey and how I changed career in my 30s from boring monotony to an exciting software engineering role. If ever you needed motivation or wanted my own specific advice on how to become a self-taught developer, then you make sure you don't miss it. Will be available next week!

LivePython
Автор

i checked whether my playback speed set to normal.

suneelvarma
Автор

this is the first time that I have to slow down the video instead of speed x2, still very helpful nonetheless

dazaistudies
Автор

If you were also really confused because you, like me, had no idea what "dunder" was, apparently it's short for Double UNDERscore, the characters that come before and after the init method.

SamChaneyProductions
Автор

i still dont understand why the below gets called in this order. So confused.



Base.__init__
Child2.__init__
Child1.__init__
Child3.__init__

ApplySkills
Автор

The last example mixed me up. The class Ten doesn't have any superclass, how does sup() method call the class Hundred in the case of multiple inheritance? I tried no use sup(), and only the class Ten's adder method is called.

hikmetcelik
Автор

Ah, getting to the point it's getting so difficult. Always had a problem with connecting information you receive, and I just don't understand. But when you connect the dots, you say "Ahaa.." But I'm still searching for that "Ahaa.." moment.. But I won't surrender. I won't quit. I wanna learn python, then continue with coding. Thanks for this video btw.

lovepeacegothamjoke
Автор

I started on Python as everybody but then moved to Django. I didn't understand super() too much (I just blindly copy that part of the code and assumed it called something on the Parent class).

Thanks for making everything so simple :)

letslearnabout
Автор

Love what you're doing with the channel. Looks slick, flows well and gives plenty of coding examples to demonstrate or answer questions we might have

realdanley
Автор

So everyone just talks about behaviour of super in __init__. What about __new__ method.?

Techie-time
Автор

"Over the next five minutes, we'll be covering what might be Python's most poorly understood feature: super()"
So therefore to help you better understand this i will explain this very quickly so by the time this video is done. You will still be lost.

thanks...

-PhilGibson
Автор

Super helpful! Thanks very much. Very clear and articulate.

Kinsella-yt
Автор

I did not understand why the hundred class could not locate the arguments (1, 2, 3) considering it has the same "add" method. I thought it should had taken these values and return the value 106. Why this did not happen? I am aware it does not used "Super", so basically it could not inherit the arguments because of this? So the method becomes like a ghost while is compiled without using super? This is super confuse in my mind, could someone please help me to understand what happened? Thanks in advance

MarcusVinicius-lqfe
Автор

Is the reason that the order prints: Base, child2, Child1, Child3 due to the fact that Child3 calls (Child 1, Child2) in that order? I changed it to Child3(Child2, Child1) and the order of operations changed to print out Base, then 1, 2, 3. So when you call multiple parent classes you also are determining the order of operation?

nts
Автор

Although the content is understandable, this is the type of lecturing that make the student falling sleep.

hrs.ai
Автор

i'm confused. you didn't call the classes, but instead assigned the variables to the classes. how did you call the classes without calling the classes?
shouldn't you need to use the following below to run it instead? (referring to code at 0:34)
Base()
Print('-'*20)
Child1()

vegaswould
Автор

My brain can't keep up...too complex

durandas
Автор

Why it executes in the below order
Base child2 child1 and child3

syedmujeebh
Автор

That's really good explanation, thank you!

РоманСилов-чт
Автор

More than your content, I love how you say "Cl-ahhh-ss". No Sarcasm. I appreciate you doing this man

brianbrian