Type Hints in Python: What, Why, and How

preview_player
Показать описание
Annotating functions and variables with type hints in Python and why you should do it.

WORK WITH ME👇🏼

✅ Implement features and fix bugs in your app: Live, one-on-one screenshare

💻 Code written in video
Рекомендации по теме
Комментарии
Автор

i have seen people teaching how to use type hints but never felt important before seeing this video. great video!

tazkhan
Автор

At minute 14:00, in Python 3.11, we will be able to write Self for the return value rather than "User" which will be handy. Thanks for the video!

khmsalhuas
Автор

Video was maybe a bit longer than it needed to be but much better than the 'just do this' explanation I got elsewhere! I can see how this will make my code more readable to others and importantly to tools, which will be able to parse this information reliably compared to the human-readable docstrings

kiri
Автор

I need circular module dependency in order to use type hint. How to safely avoid that ? Button class needs Window class and Window class needs Button class. Do I need to use typing.TypeVar() ?

kcvinu
Автор

Very nice video. You are huge inspiration man

SsaliJonathan
Автор

Emphasize readability, Wonderful! Hope may have some time to talk SOLID design principles and common design patterns in Python in near future.

goodwish
Автор

Are you allowed to have 2 functions with same name in Python? Which one will be called then?

atexnik
Автор

Sir, How Can I reach out to You, I really need your help.
Please Reply

jabiraziz
Автор

Great video!

It would be great if you made videos on sqlachemy with fastapi. There realy isn't a lot out there on this topic and fastapi is getting more and more popular. I know a lot of the code is very similar to sqlalchemy with flask, but those minor differences do make it confusing.

petarkasapinov
Автор

Thanks, excellent. Do you have a video about annotations?

DerMaikNichJa
Автор

You have misspelled my name! 😉 It's "Per Persson", not "per person".

mdperpe
Автор

LOL at saying stir instead of string for str.

Steven-wmvu