Interface Segregation In One Minute // Python Tips

preview_player
Показать описание


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

What if a smart device wants to do both: sending messages and checking status. Would you have to use sth like multiple inheritance then? I guess not, since it is a Protocol; but how would you do this?

markoh
Автор

Can you also combine the two classes in single type hint? For example, you have a function that calls both methods (check_status and send_message)

jankislinger
join shbcf.ru