betty.collection.keyed.proxy module

Keyed collection proxies.

class betty.collection.keyed.proxy.KeyedCollectionProxy

Bases: KeyedCollection, Generic

A keyed collection proxy.

__init__(upstream: KeyedCollection, /)
keys() Iterable

Get an iterable over the collection’s keys.

class betty.collection.keyed.proxy.MutableKeyedCollectionProxy

Bases: KeyedCollectionProxy, MutableKeyedCollection, Generic

A mutable keyed collection proxy.

add(*values: ValueT | ResolvableValueT) None

Add one or more values to the collection.

clear() None

Remove all values from the collection.

remove(*keys: KeyT | ResolvableKeyT) None

Remove one or more keys from the collection.