Vladimir

43%
Flag icon
Abstract base classes complement duck typing by providing a way to define interfaces when other techniques like hasattr() would be clumsy or subtly wrong (for example, with magic methods). ABCs introduce virtual subclasses, which are classes that don’t inherit from a class but are still recognized by isinstance() and issubclass();
Fluent Python: Clear, Concise, and Effective Programming
Rate this book
Clear rating
Open Preview