The following table shows the various abstract base classes that are used throughout python. However, I'm a little confused (in this context)
what is the difference between column Abstract Methodsand column Mixin Methods. Is one option possible and the other not?
Abstract Methods
Mixin Methods
I considered this, and each of my "theories" seems to be wrong.
link
Everything in the Abstract Methods column, you have to realize yourself. ABC provides standard method implementations in the Mixin Methods column, implemented as methods that you must write.
- , , ABC.
Mixin , , , object, ABC. __getitem__, __iter__ , .
object
__getitem__
__iter__
, , , issubclass(your_class, any_ABC), - isinstance(your_object, any_ABC). .
issubclass(your_class, any_ABC)
isinstance(your_object, any_ABC)