groundwork icon indicating copy to clipboard operation
groundwork copied to clipboard

Use AbtractBaseClass for Basic Patterns

Open danwos opened this issue 9 years ago • 0 comments

The GwBasePattern should inherit from ABC and provide some abstract methods, which needs to be implemented by child classes/patterns/plugins. Like activate(), deactivate().

See https://docs.python.org/3/library/abc.html and https://julien.danjou.info/blog/2013/guide-python-static-class-abstract-methods

Another approach would be to use metaclasses and check the existence of class-members during class creation by customizing __new__

danwos avatar Dec 16 '16 07:12 danwos