WRITELOOP

INTERFACES IN PYTHON

2020 August 5

Interfaces

Contain abstract methods - no concrete methods and no internal states (instance variables).

Abstract Classes

Contain abstract methods, concrete methods and internal states.

Mixins

Abstract Classes WITHOUT internal states.

IMPORTANT:

  • Those 3 are just conventions
  • Those 3 types of classes MUST NOT BE DIRECTLY INSTANTIATED, since they are just a base that you can build other classes on.