dictIO.utils.counter module#

class dictIO.utils.counter.BorgCounter#

Bases: object

A class that implements a static global counter. Instances of this class all share the same global counter. This is used in DictReader class to assure that multiple instances of CppDict do not generate conflicting IDs for placeholder strings (as would be the case otherwise when merging included dicts).

Borg: Dict[str, int] = {'theCount': -1}#
static reset()#

Reset the BorgCounter.

class dictIO.utils.counter.DejaVue#

Bases: object

A class that implements a static global registry of strings.

djv: Dict[str, List[str]] = {'strings': []}#
property strings: List[str]#

Return a list with all strings currently registered with DejaVue.

Returns:

list with all strings currently registered with DejaVue.

Return type:

List[str]

reset()#

Reset DejaVue.

Clears the list of registered strings.