BorgCounter¶
- class dictIO.utils.counter.BorgCounter¶
Bases:
objectA class that implements a static global counter.
Instances of this class all share the same global counter. This is used in DictReader class to ensure that multiple instances of SDict do not generate conflicting IDs for placeholder strings (as would be the case otherwise when merging included dicts).
- Borg¶
Shared storage for the counter value.
- Type:
ClassVar[dict[str, int]]
- __init__() None¶
Initialize an instance that shares the class-level counter.
- Return type:
None
Methods
__init__()Initialize an instance that shares the class-level counter.
reset()Reset the BorgCounter.
Attributes
- static reset() None¶
Reset the BorgCounter.
- Return type:
None
- Borg: ClassVar[dict[str, int]] = {'theCount': -1}¶