Expert Python Tutorial #4 – Decorators

///Expert Python Tutorial #4 – Decorators

Expert Python Tutorial #4 – Decorators

FavoriteLoadingAdd to favorites

In this video I’ll be discussing python decorators. Decorators are a way to modify the behavior of a function without changing any of it’s code. Decorators have many different use cases but are typically used when minor changes need to be made to many different functions.

⭐️ Thanks to Kite for sponsoring this video! Download the best AI automcolplete for python programming for free:

Playlist:

◾◾◾◾◾
💻 Enroll in The Fundamentals of Programming w/ Python

📸 Instagram:
🌎 Website
📱 Twitter:
⭐ Discord:
📝 LinkedIn:
📂 GitHub:
🔊 Podcast:

💵 One-Time Donations:
💰 Patreon:
◾◾◾◾◾◾

⚡ Please leave a LIKE and SUBSCRIBE for more content! ⚡

⭐ Tags ⭐
– Tech With Tim
– Python Tutorials
– Decorators Python
– Python Decorators Tutorial
– Decorators Tutorial Python

⭐ Hashtags ⭐
#Python #ExpertPython

source

By |2020-12-13T11:12:10+00:00December 13th, 2020|Python Video Tutorials|41 Comments

41 Comments

  1. Divyanshu Parihar December 13, 2020 at 11:12 am - Reply

    Good concept to learn before any high level frameworks

  2. robo_mark December 13, 2020 at 11:12 am - Reply

    thank you!

  3. Sean Hare December 13, 2020 at 11:12 am - Reply

    Top notch!

  4. Sid n Rock December 13, 2020 at 11:12 am - Reply

    Well Articulated.

  5. prajwal yp December 13, 2020 at 11:12 am - Reply

    hi tim, thanks a lot for this video , decorators concept is so clear now , best explanation, this is my first ever comment on youtube

  6. mister kluge December 13, 2020 at 11:12 am - Reply

    a bit more clear than the usual explanation of decorators

  7. Adithyan Benoy December 13, 2020 at 11:12 am - Reply

    Hey nice tutorial😊subscribed🤍
    And also which IDE r u using? Is it available in Windows?

  8. Achraf Ghalib December 13, 2020 at 11:12 am - Reply

    Please i need an answer, i don't know what to type in google : when you store the return value in a variable and then return it, why does the prints show up between the "started" and "ended" strings?

  9. Papes December 13, 2020 at 11:12 am - Reply

    Now that I've seen the decorator function used as a time an execution of the function. One of the things I can think of that could be useful for using decorators are unit tests, is it correct?
    We can write unit tests for functions so we want to cover the major outcomes of the function and if they work as expected.

  10. FU:TURE December 13, 2020 at 11:12 am - Reply

    Came for expert freaky dicky, stayed for pre-medium

  11. Zoltan December 13, 2020 at 11:12 am - Reply

    Hey Tim, just one question. What's the point of creating the wrapper function? It feels like an unnecessary step. The first example could just go without it. The problem occurs when arguments are passed to the function, but why? Can you explain please, thanks.

  12. nick wu December 13, 2020 at 11:12 am - Reply

    learning by coding, great !

  13. Martin Schrodt December 13, 2020 at 11:12 am - Reply

    Nice tutorial, but it would have been clearer if you called func wrap instead and maybe func2 foo and func3 bar. That way it would have been x = wrap(foo) which is much clearer.

  14. yogeshsingular December 13, 2020 at 11:12 am - Reply

    Really cool

  15. Pankaj Rawat December 13, 2020 at 11:12 am - Reply

    one of the best explanation of confusing concepts like metaclasses and decorators. Thanks for awesome videos !!! 🙂

  16. Sergio Apreda December 13, 2020 at 11:12 am - Reply

    Personally, this does not seems on par with the rest of your material. A lot more could've been said (decorator with arguments, multiple decorators resolution order, class decorators, ….etc). Example-wise the timer is fine, but maybe a little bit over-simplistic, it is an expert tutorial after all. That said, i really appreciate all the effort you put in your videos, and found your material very useful in many occasions, so keep up the good work!
    .

  17. retnikt December 13, 2020 at 11:12 am - Reply

    do the descriptor protocol next

  18. Lofwyrf December 13, 2020 at 11:12 am - Reply

    This was so uuuuuuuuussssssssssssssefull thanks a lot. Never understood what Decoraters actualy did.

  19. Dago Porras Plata December 13, 2020 at 11:12 am - Reply

    how it works when you apply 2 or more decorators? I mean, python applies decorators in some order?

  20. Victor Calderon December 13, 2020 at 11:12 am - Reply

    I think I can finally incorporate them into my code! As a self-taught Biotech your content does all the difference, thank you!

  21. FUNG36987 December 13, 2020 at 11:12 am - Reply

    you didn't mention the implementation on decorators having their own parameters which in some cases are more generic and flexible

  22. chethan b December 13, 2020 at 11:12 am - Reply

    The best tutorial for getting into expert zone
    Kindly Dont miss to teach us about threading ♥️

  23. soul strategy December 13, 2020 at 11:12 am - Reply

    Excellent to see your use cases here of decorators made it easy to understand because you linked to stuff covered in other video about passing a function as an argument.
    Question for you if you see this: how would you iterate over attributes of a class instance?

  24. Rodrigo Fernandes December 13, 2020 at 11:12 am - Reply

    If decorators can dynamically change functions, then are they somehow similar to pointers on the C language?

    LoL

    great video, I had a previous knowledge about decorators, but your tutorial made it much more clear to me xD

  25. T N December 13, 2020 at 11:12 am - Reply

    Listen to his voice at 12:24 haaaaaa. Good tutorial though thanks man!

  26. GEoRgeTte BEuLaH December 13, 2020 at 11:12 am - Reply

    This make so much sense and meaning

  27. LMagicz Lukas December 13, 2020 at 11:12 am - Reply

    I always wait for a new video in this series.

  28. Rahul Tirkey December 13, 2020 at 11:12 am - Reply

    Learned a lot of advanced stuff from your tutorial. Keep making more tutorials.

  29. RagHelen December 13, 2020 at 11:12 am - Reply

    How comes that you can't come up with one reasonable example?

  30. Mohammed Fareedh December 13, 2020 at 11:12 am - Reply

    Thanks Tim

  31. VébèX PlæYã December 13, 2020 at 11:12 am - Reply

    Please Sockets in Python, Please Tim 🙂🙃

  32. Rolando García December 13, 2020 at 11:12 am - Reply

    Hey bro. Thanks for your tutorials. You are the best

  33. Nissal December 13, 2020 at 11:12 am - Reply

    You should elaborate more on how *args and **kwargs are used in a future python expert video

  34. Nissal December 13, 2020 at 11:12 am - Reply

    Saw decorators being used the pizza API code you've used in a previous vid series. Really interesting to see how it works, especially with *args and **kwargs

  35. impos1ble32 December 13, 2020 at 11:12 am - Reply

    Awesome video, learned a lot. surprised that you did it almost perfectly in one take!

  36. Andrea Codutti December 13, 2020 at 11:12 am - Reply

    Another useful application is memoizing recursive function calls, for example for Fibonacci sequence

  37. Mr. Tech Guy December 13, 2020 at 11:12 am - Reply

    One of the most informative tutorials!
    💯💯💯💯💯💯

  38. willet2 December 13, 2020 at 11:12 am - Reply

    Instead of showing the program syntax – I think the best tutorial is showing real, practical application programs. Variable definitions and function definitions can be found in every manual.

    What is useful, is to show the overall structure of the program: how the program is built depending on its purpose, and what part of it is responsible for. From General to specific.

    It's like learning a foreign language from a boring alphabet. There are plenty of such tutorials.

    And yet to learn a language, you can start to play specific genre scenes from real life.

  39. tiga December 13, 2020 at 11:12 am - Reply

    Full Django course please 😉

  40. Cicada Here December 13, 2020 at 11:12 am - Reply

    Kindly make a full course on Django plz

  41. Erick Alvarez December 13, 2020 at 11:12 am - Reply

    Geez never thought I'd learn this much from a YouTube video, did not regret of subscribing, thanks a lot, now I understand more

Leave A Comment

*