filtering
quickdict.fitlering module.
Filtering of dictionaries.
qd_filter(p: None | Callable[[V], bool], m: Mapping[K, V]) -> dict[K, V]
Return a filtered dict with the predicate applied to the values.
p might be
None: filtered bybool(v),- otherwise: filtered by
p(v).
Python implementation.
Source code in quickdict\filtering\_pyfiltering.py
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | |
qd_kfilter(p: Callable[[K], bool], m: Mapping[K, V]) -> dict[K, V]
Return a filtered dict with the predicate applied to the keys.
Filtered by p(k).
Python implementation.
Source code in quickdict\filtering\_pyfiltering.py
40 41 42 43 44 45 46 47 48 49 50 51 52 | |
qd_kvfilter(p: Callable[[K, V], bool], m: Mapping[K, V]) -> dict[K, V]
Return a filtered dict with the predicate applied to the items.
Filtered by p(k, v).
Python implementation.
Source code in quickdict\filtering\_pyfiltering.py
54 55 56 57 58 59 60 61 62 63 64 65 66 | |
qd_ifilter(p: None | Callable[[V], bool], m: MutableMapping[K, V]) -> MutableMapping[K, V]
Filter with the predicate applied to the values.
p might be
None: filtered bybool(v),- otherwise: filtered by
p(v).
Python implementation.
Source code in quickdict\filtering\_pyfiltering.py
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 | |
qd_ikfilter(p: Callable[[K], bool], m: MutableMapping[K, V]) -> MutableMapping[K, V]
Filter a mapping with the predicate applied to the keys.
Filtered by p(k).
Python implementation.
Source code in quickdict\filtering\_pyfiltering.py
93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 | |
qd_ikvfilter(p: Callable[[K, V], bool], m: MutableMapping[K, V]) -> MutableMapping[K, V]
Filter a mapping with the predicate applied to the items.
Filtered by p(k, v)
Python implementation.
Source code in quickdict\filtering\_pyfiltering.py
109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 | |