internal.types.collections.dict

Standard library module View source
class DictEntry
@tuple
class DictEntry[K, V]
Fields 5
key K
value V
hash int
K type
V type
Methods 1
with_value
with_value(self, new_value: V)
Special methods 1
__deepcopy__
__deepcopy__(self)
class OrderedDict
class OrderedDict[K, V]
Fields 2
K type
V type
Constructors 3
__init__
__init__(self, capacity: int = 8)
__init__
__init__(self, items: Generator[Tuple[K, V]])
__init__
__init__(self, other: OrderedDict[K, V])
Methods 13
copy
copy(self)
resize
resize(self, minused: int)
get
get(self, key: K)
get(self, key: K, default: V)
setdefault
setdefault(self, key: K, value: V)
pop
pop(self, key: K)
pop(self, key: K, missing)
popitem
popitem(self)
keys
keys(self)
values
values(self)
items
items(self)
update
update(self, other)
clear
clear(self)
fromkeys
fromkeys(ks: Generator[K], v: V, K: type, V: type)
increment
increment(self, key: K, by: T = 1, T: type)
Special methods 17
__copy__
__copy__(self)
__deepcopy__
__deepcopy__(self)
__len__
__len__(self)
__bool__
__bool__(self)
__setitem__
__setitem__(self, key: K, value: V)
__getitem__
__getitem__(self, key: K)
__contains__
__contains__(self, key: K)
__delitem__
__delitem__(self, key: K)
__reversed__
__reversed__(self)
__iter__
__iter__(self)
__eq__
__eq__(self, other: OrderedDict[K, V])
__ne__
__ne__(self, other: OrderedDict[K, V])
__or__
__or__(self, other)
__ior__
__ior__(self, other)
__repr__
__repr__(self)
__dict_do_op_throws__
__dict_do_op_throws__(self, key: K, other: Z, op: F, F: type, Z: type)
__dict_do_op__
__dict_do_op__(self, key: K, other: Z, dflt: V, op: F, F: type, Z: type)
class UnorderedDict
class UnorderedDict[K, V]
Fields 2
K type
V type
Constructors 4
__init__
__init__(self)
__init__
__init__(self, capacity: int)
__init__
__init__(self, g: Generator[Tuple[K, V]])
__init__
__init__(self, other: UnorderedDict[K, V])
Methods 13
resize
resize(self, new_n_buckets: int)
get
get(self, key: K, default: V)
get(self, key: K)
setdefault
setdefault(self, key: K, val: V)
increment
increment(self, key: K, by: T = 1, T: type)
update
update(self, other)
update(self, other: UnorderedDict[K, V])
pop
pop(self, key: K)
pop(self, key: K, missing)
popitem
popitem(self)
clear
clear(self)
items
items(self)
keys
keys(self)
values
values(self)
copy
copy(self)
fromkeys
fromkeys(ks: Generator[K], v: V, K: type, V: type)
Special methods 17
__getitem__
__getitem__(self, key: K)
__setitem__
__setitem__(self, key: K, val: V)
__delitem__
__delitem__(self, key: K)
__contains__
__contains__(self, key: K)
__eq__
__eq__(self, other: UnorderedDict[K, V])
__ne__
__ne__(self, other: UnorderedDict[K, V])
__iter__
__iter__(self)
__len__
__len__(self)
__or__
__or__(self, other)
__ior__
__ior__(self, other)
__copy__
__copy__(self)
__deepcopy__
__deepcopy__(self)
__repr__
__repr__(self)
__bool__
__bool__(self)
__dict_do_op_throws__
__dict_do_op_throws__(self, key: K, other: Z, op: F, F: type, Z: type)
__dict_do_op__
__dict_do_op__(self, key: K, other: Z, dflt: V, op: F, F: type, Z: type)
__reversed__
__reversed__(self)