Skip to main content

ModuleMapProtocol

ModuleMapProtocol Objects​

class ModuleMapProtocol(typing.Protocol)

A package's modules, keyed by module name.

contains_key​

def contains_key(key: Identifier) -> bool

Whether a value is stored under key.

entries​

def entries() -> typing.List[ModuleMapEntry]

Every entry, in key order.

get​

def get(key: Identifier) -> typing.Optional[bytes]

The value stored under key, or None if there is none.

is_empty​

def is_empty() -> bool

Whether the map holds no entries.

keys​

def keys() -> typing.List[Identifier]

Every key, in key order.

len​

def len() -> int

The number of entries.

values​

def values() -> typing.List[bytes]

Every value, ordered by the key it is stored under.