Python super function 🦸

  Рет қаралды 103,783

Bro Code

Bro Code

3 жыл бұрын

python super function tutorial example explained
#python #super #super()
super() = Function used to give access to the methods of a parent class.
Returns a temporary object of a parent class when used
class Rectangle:
def __init__(self, length, width):
self.length = length
self.width = width
class Square(Rectangle):
def __init__(self, length, width):
super().__init__(length,width)
def area(self):
return self.length*self.width
class Cube(Rectangle):
def __init__(self, length, width, height):
super().__init__(length,width)
self.height = height
def volume(self):
return self.length*self.width*self.height
square = Square(3, 3)
cube = Cube(3, 3, 3)
print(square.area())
print(cube.volume())
Bro Code merch store 👟 :
===========================================================
teespring.com/stores/bro-code-5
===========================================================
music credits 🎼 :
===========================================================
Up In My Jam (All Of A Sudden) by - Kubbi / kubbi
Creative Commons - Attribution-ShareAlike 3.0 Unported- CC BY-SA 3.0
Free Download / Stream: bit.ly/2JnDfCE
Music promoted by Audio Library • Up In My Jam (All Of A...
===========================================================

Пікірлер: 228
@BroCodez
@BroCodez 3 жыл бұрын
# super() = Function used to give access to the methods of a parent class. # Returns a temporary object of a parent class when used class Rectangle: def __init__(self, length, width): self.length = length self.width = width class Square(Rectangle): def __init__(self, length, width): super().__init__(length,width) def area(self): return self.length*self.width class Cube(Rectangle): def __init__(self, length, width, height): super().__init__(length,width) self.height = height def volume(self): return self.length*self.width*self.height square = Square(3, 3) cube = Cube(3, 3, 3) print(square.area()) print(cube.volume())
@kccchiu
@kccchiu 2 жыл бұрын
Straight to the point. A perfect example to explain the function. Thanks!
@muchossablos
@muchossablos 3 жыл бұрын
You've got the perfect learning curve. Give us a step forward, and public more advanced topics, at this pace.
@Amir_Plays_non_stop
@Amir_Plays_non_stop 3 жыл бұрын
I would like if you do videos where u work on a specific project so we can learn more advance about python.
@BroCodez
@BroCodez 3 жыл бұрын
Thanks for the suggestion! I'll look into that!
@Drew_League_95
@Drew_League_95 2 жыл бұрын
Super easy to grasp the concept. Thank you, and keep up the good work! :)
@iscoto4914
@iscoto4914 2 жыл бұрын
This is one of the best explanation about super function
@sanjeevKumar-eg6hp
@sanjeevKumar-eg6hp 10 ай бұрын
This is an awesome video. To point and precise explanation no BS. Thanks for the knowledge. Appreciate the time and effort in making it such a simple video
@madushaninimeshika3910
@madushaninimeshika3910 Жыл бұрын
A very good explanation..thank you very much....
@LucyHealthy97
@LucyHealthy97 2 жыл бұрын
Your video is really helpful! Thank you so much, hope you can do more videos like this
@chernoboogaloo
@chernoboogaloo 2 ай бұрын
I appreciate the explanation. Concise and very helpful
@chalkypj
@chalkypj 10 ай бұрын
Great video. You explained it in a simple easy to understand way. I'm new to python coding and I used the super function to add additional functionality to an update function in a child class by calling the super().update() function in the first line of a child's update function.
@williepietersen4707
@williepietersen4707 7 ай бұрын
Very well explained. Thanks a lot.
@KarolinaRiddle111
@KarolinaRiddle111 2 жыл бұрын
I like the way you teaching. Everything is very clearly explained. :)
@mohammed09u32
@mohammed09u32 10 ай бұрын
WOW! You were amazing I watched many tutorials and never understood how super() works until I watched your video. I will share your channel with my colleagues, keep going.....
@jahnvisikligar7397
@jahnvisikligar7397 Жыл бұрын
the explanation of super() was very concise to the point. it cleared my doubts very well. loved this!!!!
@kassandrarojass
@kassandrarojass 10 ай бұрын
This was exactly what I needed-- Thank you for this!!
@samster1004
@samster1004 Жыл бұрын
well explained and with a nice simple example. You've got a new subscriber
@The-Martian73
@The-Martian73 Жыл бұрын
I really enjoyed the show 🤟 Thanks bro
@theeox
@theeox 2 жыл бұрын
That was very helpful. I find I learn new things everyday and this was no exception. Thanks!
@Yazan_Majdalawi
@Yazan_Majdalawi 3 жыл бұрын
I'm happy I'm here in this channel this early... Subscribed 💗
@AzgarD555
@AzgarD555 3 жыл бұрын
This channel should get more view's, you always help me with something I never understanded super classes, but now i do, thanks :)
@1234bellamy
@1234bellamy Ай бұрын
No wayyyy, you're a Yxngxr1 fan and a programmer too? #Rare.
@dzieckodisneychannel
@dzieckodisneychannel 2 жыл бұрын
Quick and easy explanation, thank you :)
@mArjunyadav
@mArjunyadav 2 жыл бұрын
Great ,short and crisp
@raygames5636
@raygames5636 Жыл бұрын
Damn, bro, this is the best explanation of super function! Thanks a lot!
@yejinrhee4576
@yejinrhee4576 2 жыл бұрын
love a to z of ur video! thx :)
@kinjalkumar1900
@kinjalkumar1900 Жыл бұрын
Thanks for explaining it in such an easy way broo.....
@Code4Life400
@Code4Life400 5 ай бұрын
This is the clearest explanation video ever!
@Arun-jc3pf
@Arun-jc3pf Жыл бұрын
Appreciate the vids man!
@danirismagilov5248
@danirismagilov5248 Жыл бұрын
Thanks for useful information!
@michellegutierrez4690
@michellegutierrez4690 3 жыл бұрын
Thank you! You explained helped me to understand it
@rottenapple7373
@rottenapple7373 Жыл бұрын
Thank you for using Rectangles. That helped me plug in your info much easier!!!
@BomDia.Filho_
@BomDia.Filho_ 2 жыл бұрын
simple and very well explained, thanks!
@aashayamballi
@aashayamballi 3 жыл бұрын
thank you for the clear explanation! :)
@davidhoffman676
@davidhoffman676 6 ай бұрын
Great, straight to the the point video, thanks!
@ammarshahzad9627
@ammarshahzad9627 Жыл бұрын
perfect, straight to the point, Thank you
@HubertRozmarynowski
@HubertRozmarynowski 2 жыл бұрын
Thank you Mr. Bro Code, this was very helpful.
@work9167
@work9167 2 жыл бұрын
This video about super function is just super, bro!
@px0736
@px0736 11 ай бұрын
Thanks bro! I appreciate your contribution 👊
@Go_Pr0
@Go_Pr0 14 күн бұрын
I liked your video, thanks!
@sauravtiwari3750
@sauravtiwari3750 2 жыл бұрын
you made it simple broo jjust subscribed keep it upp thumbs upp
@nemesai1985
@nemesai1985 Жыл бұрын
Cool explanation.
@mannnanshaikh7608
@mannnanshaikh7608 Жыл бұрын
u are the best teacher i have in my life. thank you so much and i appriciate ur time and work very much. stay safe and healthy brother . peace
@innovatornag1398
@innovatornag1398 9 ай бұрын
Nice Explanation.Thanks
@winter8476
@winter8476 2 жыл бұрын
1st the seeing this channel.... the name plus the explanation is 10/10
@mopz3985
@mopz3985 2 жыл бұрын
Thanks for a good video. I can see clearly now :)
@qinzideng9270
@qinzideng9270 Жыл бұрын
Very helpful! thanks
@aliakhavan6553
@aliakhavan6553 2 жыл бұрын
it was so helpful thanks bro
@khaleddawoud363
@khaleddawoud363 2 жыл бұрын
well explained. Thank you
@masoudargoshi4312
@masoudargoshi4312 Жыл бұрын
thank you that you learn us the super function
@mojtabamonfared4751
@mojtabamonfared4751 2 жыл бұрын
super() helpful! thank you
@RA-bo9cl
@RA-bo9cl 3 жыл бұрын
yea, you really help me. Thank you
@imukudzeicharles2960
@imukudzeicharles2960 6 ай бұрын
This was the easiest explanation. thank you
@mahendrasonawane224
@mahendrasonawane224 Жыл бұрын
Easy to understand...!!!
@alexlavertyau
@alexlavertyau Жыл бұрын
finally found a video with explanation of super that i understand thanks!
@Belladonna_khaday
@Belladonna_khaday 9 күн бұрын
Bro Code is my best programming teacher. Thank you so much for this lesson❤❤❤❤
@dineshgautam7027
@dineshgautam7027 2 жыл бұрын
Great....... Bro....
@moukaloka9543
@moukaloka9543 3 жыл бұрын
super explanation !!!
@gokulkrishnan4721
@gokulkrishnan4721 2 жыл бұрын
Awesome need some project based OOPS approach🥰 love from 🇮🇳❣️
@visionlanguages1999
@visionlanguages1999 10 ай бұрын
you are the man !! Thx!!
@dildoranutfieva9632
@dildoranutfieva9632 2 жыл бұрын
Man I watched 4 tutorial about super(). But you were the only one who could explain. print("You're a good man")
@Unknown-ki8yk
@Unknown-ki8yk 2 жыл бұрын
I used it for the first time in a job assessment, I wanted to make sure that if I used it correctly, and yes it was correct. Thanks, Bro
@Sugardadfps
@Sugardadfps Жыл бұрын
Thanks! Easy to digest!
@vasildimitrov7251
@vasildimitrov7251 5 ай бұрын
Really helpful !
@naveengoyal5243
@naveengoyal5243 3 жыл бұрын
Simply awesome
@DMcDonald14
@DMcDonald14 2 жыл бұрын
Awesome Bro thanks
@altayezekariyas9243
@altayezekariyas9243 2 жыл бұрын
i came here from another tutorial, just to understand what the super class was and i liked ur content
@srali7609
@srali7609 2 жыл бұрын
fantastic explanation
@qwertymegaforce9088
@qwertymegaforce9088 2 ай бұрын
Short and simple! What a Gigachad!
@9042jeremy
@9042jeremy 2 жыл бұрын
Thanks, Bro Code, very clear explanations. A quick question: what is the motivation for passing the class Rectangle to the __init__ method for square and cube, versus having a Rectangle instance passed to them?
@paantur
@paantur Жыл бұрын
Great explanation
@Tete92378
@Tete92378 2 жыл бұрын
Brilliant!!!
@samirlehaff
@samirlehaff 8 ай бұрын
That was Super !!!!!!
@yahya-ke4ef
@yahya-ke4ef 2 жыл бұрын
thank you. that was clear
@robertomanrique8004
@robertomanrique8004 2 жыл бұрын
great help bro!
@rishi4418
@rishi4418 2 жыл бұрын
Thanks bro 😊 perfecto
@yellowbannana8989
@yellowbannana8989 2 жыл бұрын
thx this helped a lot, we can also use *args to not repeat specifying params
@LAKD
@LAKD Жыл бұрын
I hate when I see videos that are 15 minutes, when it can clearly be explained in 5 minutes or less. Thanks!
@rahulunniyampath7129
@rahulunniyampath7129 6 ай бұрын
needed this!
@henriquefelinimena7433
@henriquefelinimena7433 3 жыл бұрын
Thank you Bro!
@artorias7224
@artorias7224 Жыл бұрын
YOU SAVED MY LIFE THANK YOU
@expectations2188
@expectations2188 2 жыл бұрын
awesome tutorial
@EissaAlahdul
@EissaAlahdul Жыл бұрын
Thanks you a lot
@VworksArt
@VworksArt 2 жыл бұрын
Thank you friend
@nadew.02
@nadew.02 Жыл бұрын
Thank you so much
@lw9954
@lw9954 Жыл бұрын
Nice video bro.
@brutussparkles1659
@brutussparkles1659 3 жыл бұрын
Thanks bro
@mostafaghobashy2724
@mostafaghobashy2724 Жыл бұрын
great vid
@prasannamahendrachavhan3612
@prasannamahendrachavhan3612 Жыл бұрын
gazab
@shubhojeetghosh9694
@shubhojeetghosh9694 9 ай бұрын
Thankyou🎉
@yasinsherif8875
@yasinsherif8875 Жыл бұрын
Thanku brother
@riceball7238
@riceball7238 6 ай бұрын
quick and simple
@Santa9204
@Santa9204 11 ай бұрын
Nicely done. Subscribed
@burakkaymaz9233
@burakkaymaz9233 Жыл бұрын
thank oyu so much
@jasuow
@jasuow 2 жыл бұрын
made so easy, thanks
@tarikyassa1076
@tarikyassa1076 3 жыл бұрын
Thanks Bro!
@rostislavmalyshev1775
@rostislavmalyshev1775 2 жыл бұрын
Thanks!
@bluesdog88
@bluesdog88 3 жыл бұрын
Thanks for the explanation, taking a long time to get my head around classes, probably because i haven't used them in any of the simple programs I have written. Just about to learn Java in a uni class, is there a good process for understanding program design, as in what to use where i seem to be getting very lost there. I guess that's basic program design that comes before anything like data structures and algorithms, should i be reading more about object oriented programming in general?
@heyy7149
@heyy7149 7 ай бұрын
That was so easy, I was stressing for no reasons
@y.nicole3653
@y.nicole3653 3 жыл бұрын
thank you :)
@PeritoProducciones
@PeritoProducciones 10 ай бұрын
Thank you, bro.
SUPER() in Python explained! 🔴
13:06
Bro Code
Рет қаралды 4,7 М.
super/MRO, Python's most misunderstood feature.
21:07
mCoding
Рет қаралды 214 М.
Slow motion boy #shorts by Tsuriki Show
00:14
Tsuriki Show
Рет қаралды 8 МЛН
Эффект Карбонаро и нестандартная коробка
01:00
История одного вокалиста
Рет қаралды 9 МЛН
A teacher captured the cutest moment at the nursery #shorts
00:33
Fabiosa Stories
Рет қаралды 19 МЛН
Python abstract classes 👻
7:45
Bro Code
Рет қаралды 74 М.
Python Object Oriented Programming in 10 minutes 🐍
10:04
Bro Code
Рет қаралды 366 М.
A simple explanation of super() in Python
15:02
Sebastiaan Mathôt
Рет қаралды 46 М.
If __name__ == "__main__" for Python Developers
8:47
Python Simplified
Рет қаралды 389 М.
PLEASE Use These 5 Python Decorators
20:12
Tech With Tim
Рет қаралды 103 М.
Python Object Oriented Programming (OOP) - For Beginners
53:06
Tech With Tim
Рет қаралды 3,3 МЛН
*Args and **Kwargs in Python
3:49
b001
Рет қаралды 257 М.
Python 101: Learn the 5 Must-Know Concepts
20:00
Tech With Tim
Рет қаралды 1,1 МЛН
Functions in Python are easy 📞
10:38
Bro Code
Рет қаралды 427 М.
Python inheritance 👪
7:19
Bro Code
Рет қаралды 77 М.
Какой ноутбук взять для учёбы? #msi #rtx4090 #laptop #юмор #игровой #apple #shorts
0:18
Что делать если в телефон попала вода?
0:17
Лена Тропоцел
Рет қаралды 2,7 МЛН
Kumanda İle Bilgisayarı Yönetmek #shorts
0:29
Osman Kabadayı
Рет қаралды 1,8 МЛН
Я купил первый в своей жизни VR! 🤯
1:00
Вэйми
Рет қаралды 1,9 МЛН
iPhone 15 Pro Max vs IPhone Xs Max  troll face speed test
0:33