PLEASE Use These 5 Python Decorators

preview_player
Показать описание
In this tutorial, I'll be unveiling 5 essential Python decorators that every programmer should have in their toolkit. If you're wondering what decorators are and how they can supercharge your Python code, you're in the right place. Throughout this video, I'll dive deep into the world of decorators, explaining their fundamental principles and showcasing real-world examples of how they can streamline your code and make it more efficient.

🎞 Video Resources 🎞

⏳ Timestamps ⏳
00:00 | What Is A Decorator?
05:30 | What You NEED To Know
06:14 | @property
10:34 | @staticmethod
12:10 | @classmethod
17:09 | @dataclass

Hashtags
#TechWithTim
#PythonDecorators
#PythonProgramming
#CodingTips
Рекомендации по теме
Комментарии
Автор

The more I learn the more I realize I know nothing lol. Keep up the content. Few channels that gets me listening to tutorial videos in my spare time just for fun lol.

kameroongod
Автор

Excellent stuff. What I particularly like about the @property is that if you start without and then refactor using @property, it doesn't break your code. You just need to prepend _ to the property and add the getter and setter.

LolkeDijkstra
Автор

I love your content Tim. Keep it up. I have really learnt alot from you. I see as you as my role model

alimihakeem
Автор

Keep it up Tim! Very very high quality video.

neurooted
Автор

Tech With Tim I love your informative videos!

samukaze
Автор

This is an excellent video about decorators, I never created my own data classes with methods, but I do use the @dataclass decorator and never knew all what comes with it.

JorgeEscobarMX
Автор

Thank you very much! Truly enlightening!

jornjat
Автор

This is a great explanation of what Decorators do

JamesPancoast
Автор

Nice can you also cover descriptors and Enums in detail they improve on dataclass.

Musaafir-lnfeet
Автор

15:41 how do you type/ make those lines in the comment? Super clean. Love all your videos Tim, you have a gift for teaching

BobbyConquest
Автор

The functools cache speeding up the Fibonacci func is crazy. I know how it works but it's still crazy to see.

mattmarshall
Автор

I like functool's total_ordering decorator.

DrDeuteron
Автор

7.18 using '_' single underscore represents protected item not private, "__" this is private.

sanukyadav
Автор

is the dataclass decorator making impossible to use "global" variable inside a class how you showed using the classmethod decorator?

sildistruttore
Автор

Loved the video, but with all due respect: there is an error in the Fibonacci code. For initial conditions it should be if n < 2, return 1 (not n, as it will return 0 for n=0, but fibonacci(0) should be 1)

grmrcy
Автор

Thanks for the video ❤ what's the name of your theme in vs code

abdallahbabeker
Автор

I wouldn't say that using @dataclass decorator benefits in python coding. Because code generated by using exec() not cached where dataclass is using this by default. So, because of that. If there are a lot of dataclasses python programm will load slower

GasterLab
Автор

9:31 What would happen if we try to assign some value to c.diameter?

garfield-pro
Автор

Ok, we've got python decorators - but when are we getting python painters?

davidmurphy
Автор

Tim is da python expert. I'm afraid of pythons.

balloney