How To Avoid Coupling In Python: ABCs, Protocols, Types

preview_player
Показать описание
Python is a great language but can be prone to coupling if you're not careful. In this short, I share some tips and tricks for reducing coupling in your Python code.

#arjancodes #softwaredesign #python
Рекомендации по теме
Комментарии
Автор

I've always struggled to understand the usage of Protocol classes. You can't instantiate or inherit from them, so are they really just for avoiding type hint errors and providing a sort of theoretical concept to show that it's an interface and other classes which follow it's implementation are also an interface? So like they act as a template for anyone who wants to implement such interface classes?

pranavp.a
Автор

I don't see how using ABCs isn't also using types? What's the point of using an ABC if not to check in some function if the object that was passed to it is a subclass of the ABC...

Djellowman
Автор

I'm kind of missing the point of this short if I don't have the context of the discussion... What are these videos from?

bthrkay
Автор

Hey @ArjanCodes, you need to stand up 😅

JoLeaf
join shbcf.ru