Dependency-free python package, providing monostate owner base class through implementation of the borg pattern
pip install monostate
from monostate import MonoStateOwner
class MonoStateOwnerImplementation(MonoStateOwner):
def __init__(self, a, b):
super().__init__()
# initialize instance as per usual...
# Initialization of state:
MonoStateOwnerImplementation(69, 420)
# Instance retrieving:
instance = MonoStateOwnerImplementation.instance()- Managing of multiple MonoStateOwner Subclasses with decoupled states supported
Janek Zangenberg