counter: init-overrideable

This commit is contained in:
Konstantin Baierer 2021-03-02 16:13:03 +01:00
parent 9b1da7c023
commit 98568402c7
2 changed files with 29 additions and 0 deletions

View file

@ -7,6 +7,8 @@ class EynollahIdCounter():
def __init__(self, region_idx=0, line_idx=0):
self._counter = Counter()
self.set('region', region_idx)
self.set('line', line_idx)
def inc(self, name, val=1):
self._counter.update({name: val})