PyoMapping
Bases: PyoCollection[K], Mapping[K, V], ABC
flowchart TD
pyochain.abc._mappings.PyoMapping[PyoMapping]
pyochain.abc._collection.PyoCollection[PyoCollection]
pyochain.abc._iterable.PyoIterable[PyoIterable]
pyochain.rs.Fluent[Fluent]
pyochain.rs.Pipe[Pipe]
pyochain.rs.Tap[Tap]
pyochain.rs.Checkable[Checkable]
pyochain.abc._collection.PyoContainer[PyoContainer]
pyochain.abc._collection.PyoSized[PyoSized]
pyochain.abc._collection.PyoCollection --> pyochain.abc._mappings.PyoMapping
pyochain.abc._iterable.PyoIterable --> pyochain.abc._collection.PyoCollection
pyochain.rs.Fluent --> pyochain.abc._iterable.PyoIterable
pyochain.rs.Pipe --> pyochain.rs.Fluent
pyochain.rs.Tap --> pyochain.rs.Fluent
pyochain.rs.Checkable --> pyochain.abc._iterable.PyoIterable
pyochain.abc._collection.PyoContainer --> pyochain.abc._collection.PyoCollection
pyochain.abc._collection.PyoSized --> pyochain.abc._collection.PyoCollection
click pyochain.abc._mappings.PyoMapping href "" "pyochain.abc._mappings.PyoMapping"
click pyochain.abc._collection.PyoCollection href "" "pyochain.abc._collection.PyoCollection"
click pyochain.abc._iterable.PyoIterable href "" "pyochain.abc._iterable.PyoIterable"
click pyochain.rs.Fluent href "" "pyochain.rs.Fluent"
click pyochain.rs.Pipe href "" "pyochain.rs.Pipe"
click pyochain.rs.Tap href "" "pyochain.rs.Tap"
click pyochain.rs.Checkable href "" "pyochain.rs.Checkable"
click pyochain.abc._collection.PyoContainer href "" "pyochain.abc._collection.PyoContainer"
click pyochain.abc._collection.PyoSized href "" "pyochain.abc._collection.PyoSized"
Extends PyoCollection[K] and collections.abc.Mapping[K, V].
Serves as a base class for pyochain mappings, such as Dict.
Any concrete subclass must implement the required Mapping dunder methods:
__getitem____iter____len__
Source code in src/pyochain/abc/_mappings.py
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 | |
items()
Return a view of the Mapping items.
Returns:
| Type | Description |
|---|---|
PyoItemsView[K, V]
|
PyoItemsView[K, V]: A view of the dictionary's (key, value) pairs. |
Example
>>> from pyochain import Dict
>>> data = Dict({1: "a", 2: "b"})
>>> data.items()
PyoItemsView(Dict(1: 'a', 2: 'b'))
Source code in src/pyochain/abc/_mappings.py
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 | |
keys()
Return a view of the Mapping keys.
Returns:
| Type | Description |
|---|---|
PyoKeysView[K]
|
PyoKeysView[K]: A view of the dictionary's keys. |
Example
>>> from pyochain import Dict
>>> data = Dict({1: "a", 2: "b"})
>>> data.keys()
PyoKeysView(Dict(1: 'a', 2: 'b'))
Source code in src/pyochain/abc/_mappings.py
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | |
values()
Return a view of the Mapping values.
Returns:
| Type | Description |
|---|---|
PyoValuesView[V]
|
PyoValuesView[V]: A view of the dictionary's values. |
Example
>>> from pyochain import Dict
>>> data = Dict({1: "a", 2: "b"})
>>> data.values()
PyoValuesView(Dict(1: 'a', 2: 'b'))
Source code in src/pyochain/abc/_mappings.py
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 | |