Тёмный

SIMPLIFY your code with decorators (+ typing) 

Carberra
Подписаться 21 тыс.
Просмотров 4,2 тыс.
50% 1

Опубликовано:

 

29 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 20   
@jake115577
@jake115577 5 месяцев назад
I never would have come up with the UNITS trick! Great video sir.
@ThijsFranck
@ThijsFranck 5 месяцев назад
Thanks for highlighting ParamSpec, I've been looking for a way to define generic function parameters in Python forever!
@ritikdwivedi5983
@ritikdwivedi5983 2 месяца назад
Thanks man, it was clear and concise
@viacheslav5710
@viacheslav5710 3 месяца назад
It's wonderful! Thank you!
@pythonwithjames
@pythonwithjames 5 месяцев назад
This is great, really loved the explanation!
@Carberra
@Carberra 5 месяцев назад
Thanks man! I tried to be very thorough about it cos I get asked about decorators quote a bit, and see quite a lot of confusion about them elsewhere too.
@MaxShapira2real
@MaxShapira2real 5 месяцев назад
Love it! Awesome job as always. Could you share the link to the video that shows how type-parameterized decorators were cleaned up and made less messy?
@Carberra
@Carberra 4 месяца назад
Thanks! Soz forgot to link it ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-_QXlbwRmqgI.html
@igorthelight
@igorthelight 2 месяца назад
"Python is a very simple language!" Sure! ;-)
@Micaeljm
@Micaeljm 5 месяцев назад
Great video! I was hoping you would show how to make a decorator that supports both `@timer` and `@timer("ms")` (with or without arguments) at the end, which is something that I can never remember how to do right.
@Carberra
@Carberra 5 месяцев назад
Glad you enjoyed! And I cover that next week!
@yousefsaddeek
@yousefsaddeek 5 месяцев назад
look my local network was off and i was codding python for a little open source drawing app and i am constantly thinking about how to make it simpler and i remember that there is something called decorator in python and i thought it would be nice to use them and i spend few minutes to remember the exact sentax for decorators and i got the most part but what is driving me crazy how dose this video showed up immediately when the internet is back in my feed and since the internet was off I did not even think to use Google search or any kind of app and so you imagine the situation correctly I don't usually look for any python syntax or feature like it's so damn rare ☠️☠️☠️
@theTrigant
@theTrigant 3 месяца назад
Why do you not typehint variables inside your functions?
@Carberra
@Carberra 3 месяца назад
You mean like `x: int = 0`? Type checkers can do all they need to do without them in most instances. If you prefer to do it, by all means continue, I just prefer not.
@thomaseb97
@thomaseb97 5 месяцев назад
python generally has really bad syntax for functional concepts and such, it's very opinionated on being object oriented and imperative the type hint for a function is really bad, it can get very bloated with the Callable[[T, U], R] especially when nested and lambdas are not implemented well nor are the syntax intuative using TypeAlias from typing is very helpful to help with the bloating of Callable
@duffydan26
@duffydan26 5 месяцев назад
Can you cover meta classes in Python?
@Carberra
@Carberra 5 месяцев назад
Already have! 😄 ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-NzzKTWiaN68.html
@sto3359
@sto3359 5 месяцев назад
Great tutorial, but the guy has some serious David Koresh vibes going on :(
@Carberra
@Carberra 5 месяцев назад
Wasn't expecting to get compared to a cult leader today I'll be honest.
Далее
Python has BIOMETRIC support?!
11:43
Просмотров 2,4 тыс.
Python's contextlib is a HIDDEN GEM
14:55
Просмотров 11 тыс.
Modern Graphical User Interfaces in Python
11:12
Просмотров 1,6 млн
Are descriptors the most MISUNDERSTOOD part of Python?
16:42
Python Decorators in 15 Minutes
15:14
Просмотров 448 тыс.
Liked Pydantic? You'll LOVE Msgspec
15:53
Просмотров 12 тыс.
Generics are VITAL in typed Python
16:54
Просмотров 10 тыс.
PLEASE Use These 5 Python Decorators
20:12
Просмотров 117 тыс.
Pydantic is OP, here's why
18:10
Просмотров 23 тыс.
Advanced Golang: Generics Explained
13:37
Просмотров 66 тыс.
Pydantic Tutorial • Solving Python's Biggest Problem
11:07