python typing: Literal (intermediate) anthony explains #170

preview_player
Показать описание
today we talk about the `Literal` type in python and how it can help make overloading easier

==========

I won't ask for subscriptions / likes / comments in videos but it really helps the channel. If you have any suggestions or things you'd like to see please comment below!
Рекомендации по теме
Комментарии
Автор

that final thing is cool, much closer to how typescript does it, and much cleaner imo

in typescript you can write `as const` after a value or an object to get this behaviour

sadhlife
Автор

Awesome video, thanks! Any reason to keep `Literal[False]=False` instead of just `Literal[False]`?

marco_gorelli