Tutorial by Examples

In Object oriented programming language, a mixin is a class that contains methods for use by other classes without having to be the parent class of those other classes. How those other classes gain access to the mixin's methods depends on the language. It provides a mechanism for multiple inheritan...
In Python 3.6, PEP 487 added the __init_subclass__ special method, which simplifies and extends class customization without using metaclasses. Consequently, this feature allows for creating simple plugins. Here we demonstrate this feature by modifying a prior example: Python 3.x3.6 class Base: ...

Page 1 of 1