Python: Create Classes with Named Tuple (namedtuple) Using Typing
Автор: codevev
Загружено: 2021-05-01
Просмотров: 489
Описание:
#Shorts #Python
Python Tips and Tricks:
We already know how to use namedtuple to create classes in Python if they're simple enough and we want to reduce the amount of code we have to write. But what about all those arguments being nothing else than a string? Surely it's more prone to errors and typos. That's why I prefer to use namedtuple from the "typing" module! There are a couple of ways to do that and one is better than another (in my opinion).
-------------------------------------------------------------------------------------
Links:
Blog: https://evgenyurubkov.com
Twitter: / evgenyurubkov
Instagram: / evgenyurubkov
Youtube: / @codevev
Повторяем попытку...
Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: