Learn Python DECORATORS in 7 minutes! 🎊

  Рет қаралды 15,711

Bro Code

Bro Code

Күн бұрын

Пікірлер: 46
@BroCodez
@BroCodez 4 ай бұрын
# Decorator = A function that extends the behavior of another function # w/o modifying the base function # Pass the base function as an argument to the decorator def add_sprinkles(func): def wrapper(*args, **kwargs): print("*You add sprinkles 🎊*") func(*args, **kwargs) return wrapper def add_fudge(func): def wrapper(*args, **kwargs): print("*You add fudge 🍫*") func(*args, **kwargs) return wrapper @add_sprinkles @add_fudge def get_ice_cream(flavor): print(f"Here is your {flavor} ice cream 🍨") get_ice_cream("vanilla")
@akanjiadeola9815
@akanjiadeola9815 4 ай бұрын
Can you do power apps tutorial
@XShow.__999M
@XShow.__999M 4 ай бұрын
you are boss
@udoydas6513
@udoydas6513 4 ай бұрын
bro plz cover react advanced topics
@الطلبحامزا
@الطلبحامزا 4 ай бұрын
Please also make a video of kotlin language also
@NoName-is3tu
@NoName-is3tu 4 ай бұрын
I had some doubts regarding this topic today...and you just clutched at right time and solved my problem...thank you bro code!
@michellguzelgul4267
@michellguzelgul4267 2 ай бұрын
This is the clearest explanation I have heard. Thank you.
@Ann-pj7ie
@Ann-pj7ie 3 ай бұрын
you made the concept very clear in simple way..thank you very much
@ujjwaljohn1789
@ujjwaljohn1789 4 ай бұрын
bro you are the best programing teacher on the youtube ...... bro i beg to say please make the complete react course from beginner to advance ...... so it must be very helpful for those people who cannot afford expensive class or intuition...bro thankyou soo much once again....💓💓💐💐🤗🤗...
@mariamhasan3733
@mariamhasan3733 19 күн бұрын
Great explanation!
@alexn7208
@alexn7208 Ай бұрын
the best video for decorators finally i got it bro thanks
@lachaisegaming8263
@lachaisegaming8263 3 ай бұрын
didn't saw the time going, very helpful tutorial thx
@Abdullo_1124
@Abdullo_1124 4 ай бұрын
Your every single video is useful & meaning full Thanks for the video Bro😃
@Greenbay-bn3yk
@Greenbay-bn3yk 4 ай бұрын
Hey bro. this is one of the topics I expected from you. Thanks man!
@fordayinlife
@fordayinlife 4 ай бұрын
I 100% thought the poop emoji was coming with fudge. Nice video!
@hamdiakkob7925
@hamdiakkob7925 11 күн бұрын
I have a question, but before I gotta say you're amazing man!! You don't care about the complex terms and you explain it so simply, and you also talk about why every piece is there with reasonable examples. I could have gone to documentaries and spent a good hour on them but here I am with a solid understanding of the basics of the topic within 7 minutes. Question is, what do we need the func for? Is it a representative of the get_ice_cream function, or any function that we add this Decorator to?
@dankwabismark2598
@dankwabismark2598 4 күн бұрын
Yeah its just an argument. So any function you add the decorator to will be passed to it. Its not specific to the get_ice_cream function
@hamdiakkob7925
@hamdiakkob7925 4 күн бұрын
@@dankwabismark2598 thank you very much
@Pradeep-mh9ui
@Pradeep-mh9ui Ай бұрын
Thanks!
@AbelFikadu-lt1ei
@AbelFikadu-lt1ei 4 ай бұрын
Thanks bro very helpful😀
@dendell8860
@dendell8860 4 ай бұрын
Doubt cleared.. Thank you Sir
@a7md8762
@a7md8762 4 ай бұрын
Nice video Bro 👍
@morningwood3938
@morningwood3938 2 ай бұрын
Bro Code. You are the best.
@0ZANGETSUFLASH0
@0ZANGETSUFLASH0 2 ай бұрын
wow ur god at explaining
@TroddenAnimations
@TroddenAnimations 4 ай бұрын
Do more java videos, make games
@airslav
@airslav 3 ай бұрын
bro thank you very much🙏
@RicksterTheTrickster12
@RicksterTheTrickster12 4 ай бұрын
W work
@UmairAhmad-911
@UmairAhmad-911 4 ай бұрын
Dude you are an actual bro
@swkratis6787
@swkratis6787 4 ай бұрын
Why do this and not call the function. Its a genuine question. Thanks to whoever responds
@ALPHAAR7
@ALPHAAR7 9 күн бұрын
Calling through decorators using @at top
@pokerchannel6991
@pokerchannel6991 Ай бұрын
I played it at 2x speed, such that I got python decorators in 3.5 minutes.
@manjuch3345
@manjuch3345 2 ай бұрын
I have one doubt ,when we call multiple decorators we are using the func() within the wrapper right.At that time, base function will calling 2 times or not
@quyeny2k
@quyeny2k Ай бұрын
The add_sprinkles decorator is called first. Then within this decorator, it calls the add_fudge decorator. Eventually the base function, get_ice_cream is called. You can think like this, the add_sprikles extends the add_fudge, which extends the get_ice_cream function
@mohamedcoufi9873
@mohamedcoufi9873 4 ай бұрын
What is the use of the word in parentheses(func)*?
@ashimsarkar662
@ashimsarkar662 4 ай бұрын
See the python full course this are arguments and key arguments
@excelakachukwu2660
@excelakachukwu2660 22 күн бұрын
I am still having difficulties understanding this topic. and more recommended videos?
@sameerroshan9542
@sameerroshan9542 2 ай бұрын
why is it not calling func() per decorator when you have multiple decorators. Why isnt it printing "Here is your icecream" multiple times?
@JafoorK
@JafoorK 3 ай бұрын
Could someone let me know what these are used for? Like what can you do with it that you cannot do some other way?
@johnneisler6552
@johnneisler6552 4 ай бұрын
You are the best teacher ive ever had
@Diamond_Hanz
@Diamond_Hanz 4 ай бұрын
bro code is life
@Johnvids-g3o
@Johnvids-g3o Ай бұрын
I liked my own comment
@kallapallisai9959
@kallapallisai9959 4 ай бұрын
make a video on mongoDB plz sir
@BunrithViwatthanak
@BunrithViwatthanak 4 ай бұрын
we now don't even use Alt + ; anymore because it doesn't work. Now we use Windows Key + .(period)
@vibingowsic2338
@vibingowsic2338 4 ай бұрын
Hey bro! How is it going? Hope you are doing well. In this comment I am going to ask you about Android development tutorial in java. Hi bro, I learned java from your tutorial. But there is a problem. When I got into android development, I got stuck. Can you please do a tutorial android with java.
@georgemouxios8248
@georgemouxios8248 3 ай бұрын
what happened to your old voice? change of mic? ( algorithm comment)
@Johnvids-g3o
@Johnvids-g3o Ай бұрын
Who likes icecream🍨? 👇
Python Decorators in 15 Minutes
15:14
Kite
Рет қаралды 450 М.
Learn Python OOP in under 20 Minutes
18:32
Indently
Рет қаралды 96 М.
小路飞还不知道他把路飞给擦没有了 #路飞#海贼王
00:32
路飞与唐舞桐
Рет қаралды 75 МЛН
Players vs Pitch 🤯
00:26
LE FOOT EN VIDÉO
Рет қаралды 120 МЛН
Из какого города смотришь? 😃
00:34
МЯТНАЯ ФАНТА
Рет қаралды 1,2 МЛН
Let's code a beginner's Python BANK PROGRAM 💰
15:01
Bro Code
Рет қаралды 245 М.
5 Useful Python Decorators (ft. Carberra)
14:34
Indently
Рет қаралды 105 М.
PLEASE Use These 5 Python Decorators
20:12
Tech With Tim
Рет қаралды 120 М.
10 Important Python Concepts In 20 Minutes
18:49
Indently
Рет қаралды 265 М.
Please Master These 10 Python Functions…
22:17
Tech With Tim
Рет қаралды 204 М.
Python higher order functions 👑
6:28
Bro Code
Рет қаралды 38 М.
Python Generators Explained
28:37
Tech With Tim
Рет қаралды 158 М.
25 nooby Python habits you need to ditch
9:12
mCoding
Рет қаралды 1,8 МЛН
小路飞还不知道他把路飞给擦没有了 #路飞#海贼王
00:32
路飞与唐舞桐
Рет қаралды 75 МЛН