dissect.eventlog.utils

Module Contents

Classes

KeyValueCollection

A dictionary subclass that handles setting duplicate keys by appending an index number to the duplicate key.

class dissect.eventlog.utils.KeyValueCollection

Bases: dict

A dictionary subclass that handles setting duplicate keys by appending an index number to the duplicate key.

Example

>>>  d = KeyValueCollection()
>>>  d["foo"] = "bar"
>>>  d["foo"] = "baz"  # Duplicate key
>>>  d
{'foo': 'bar', 'foo_1': 'baz'}
idx
__setitem__(key, value)

Set self[key] to value.