core.indexing
Indexed access protocols behind value[key] and value[key] = item.
All modules · Writing docstrings
GetItem
Section titled “GetItem”type GetItem[K, V]Read a value by key. Implementations define missing-key behavior.
GetItem.get_item
Section titled “GetItem.get_item”func get_item(self, key: K): VResolve self[key] to a value.
SetItem
Section titled “SetItem”type SetItem[K, V]Write a value by key.
SetItem.set_item
Section titled “SetItem.set_item”func set_item(self, key: K, val: V)Store val at self[key].