Python Interfaces - Understanding Informal Interfaces
HTML-код
- Опубликовано: 22 сен 2024
- This is a preview of the video course, "Python Interfaces: Object-Oriented Design Principles." Interfaces play an important role in software engineering. As an application grows, updates and changes to the code base become more difficult to manage. More often than not, you wind up having classes that look very similar but are unrelated, which can lead to some confusion.
This is a portion of the complete course, which you can find here:
realpython.com...
The rest of the course takes you through how to:
- Understand how interfaces work and the caveats of Python interface creation
- Comprehend how useful interfaces are in a dynamic language like Python
- Implement an informal Python interface
- Use abc.ABCMeta and @abc.abstractmethod to implement a formal Python interface
How do you animate your typing to be so smooth?
I'm confused. Doesn't ducktyping 'inherit' implicitly not explicitly as its a Protocol interface (and thus you can't use isinstance and issubclass)?