DejaVue

class dictIO.utils.counter.DejaVue

Bases: object

A class that implements a static global registry of strings.

djv

Shared storage for registered strings.

Type:

ClassVar[dict[str, list[str]]]

ret_val

Whether the most recent call found an existing string.

Type:

bool

__init__() → None

Initialize an instance using the shared string registry.

Return type:

None

Methods

__init__()

Initialize an instance using the shared string registry.

reset()

Reset DejaVue.

Attributes

djv

strings

Return a list with all strings currently registered with DejaVue.

reset() → None

Reset DejaVue.

Clear the list of registered strings and reset the last-call result.

Return type:

None

djv: ClassVar[dict[str, list[str]]] = {'strings': []}
ret_val: bool
property strings: list[str]

Return a list with all strings currently registered with DejaVue.

Returns:

The shared list of registered strings.