Files
aostats-custom/application/src/stats/statistics.py
T
2020-03-14 12:43:58 +01:00

23 lines
364 B
Python

import abc
class Stats(abc.ABC):
@abc.abstractmethod
def new(self):
pass
@abc.abstractclassmethod
def from_other(other):
pass
@abc.abstractmethod
def update(self, other):
pass
def combined(self, other):
stats = self.new()
stats.update(self)
stats.update(other)
return stats