pythonic-fp-gadgets 4.0.4__py3-none-any.whl → 4.2.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pythonic_fp/gadgets/__init__.py +1 -0
- pythonic_fp/gadgets/box.py +43 -27
- pythonic_fp/gadgets/wrap.py +117 -66
- {pythonic_fp_gadgets-4.0.4.dist-info → pythonic_fp_gadgets-4.2.0.dist-info}/METADATA +22 -31
- {pythonic_fp_gadgets-4.0.4.dist-info → pythonic_fp_gadgets-4.2.0.dist-info}/RECORD +17 -17
- {pythonic_fp_gadgets-4.0.4.dist-info → pythonic_fp_gadgets-4.2.0.dist-info}/WHEEL +1 -1
- {pythonic_fp_gadgets-4.0.4.dist-info → pythonic_fp_gadgets-4.2.0.dist-info}/licenses/LICENSE +0 -0
pythonic_fp/gadgets/__init__.py
CHANGED
pythonic_fp/gadgets/box.py
CHANGED
|
@@ -52,7 +52,7 @@ class Box[T]:
|
|
|
52
52
|
|
|
53
53
|
Initialize ``Box`` with 0 or 1 items.
|
|
54
54
|
|
|
55
|
-
|
|
55
|
+
:param item: An optional initial item for the ``Box``.
|
|
56
56
|
|
|
57
57
|
"""
|
|
58
58
|
self._item = item
|
|
@@ -68,9 +68,9 @@ class Box[T]:
|
|
|
68
68
|
|
|
69
69
|
def __iter__(self) -> Iterator[T]:
|
|
70
70
|
"""
|
|
71
|
-
.. admonition::
|
|
71
|
+
.. admonition:: iter
|
|
72
72
|
|
|
73
|
-
|
|
73
|
+
:yields: Boxed item.
|
|
74
74
|
|
|
75
75
|
"""
|
|
76
76
|
if self:
|
|
@@ -83,7 +83,7 @@ class Box[T]:
|
|
|
83
83
|
- 1 if ``Box`` contains an item
|
|
84
84
|
- 0 if ``Box`` is empty
|
|
85
85
|
|
|
86
|
-
|
|
86
|
+
:returns: The number of items currently in the ``Box``.
|
|
87
87
|
|
|
88
88
|
"""
|
|
89
89
|
return 1 if self else 0
|
|
@@ -94,10 +94,10 @@ class Box[T]:
|
|
|
94
94
|
|
|
95
95
|
Efficiently compare ``Box`` to another object.
|
|
96
96
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
97
|
+
:param other: The object to be compared.
|
|
98
|
+
:returns: ``True`` if ``other`` is another ``Box`` containing
|
|
99
|
+
an object which compares as equal to the item
|
|
100
|
+
contained in the ``Box``, otherwise ``False``.
|
|
101
101
|
|
|
102
102
|
"""
|
|
103
103
|
if not isinstance(other, type(self)):
|
|
@@ -111,19 +111,35 @@ class Box[T]:
|
|
|
111
111
|
|
|
112
112
|
def __repr__(self) -> str:
|
|
113
113
|
"""
|
|
114
|
-
.. admonition::
|
|
114
|
+
.. admonition:: repr string
|
|
115
115
|
|
|
116
116
|
Construct string 'Box()' if empty, otherwise 'Box(item_repr)'
|
|
117
117
|
where ``item_repr = repr(item)`` for the currently contained
|
|
118
118
|
item.
|
|
119
119
|
|
|
120
|
-
|
|
120
|
+
:returns: A string to reproduce the current state of the ``Box``.
|
|
121
121
|
|
|
122
122
|
"""
|
|
123
123
|
if self:
|
|
124
124
|
return 'Box(' + repr(self._item) + ')'
|
|
125
125
|
return 'Box()'
|
|
126
126
|
|
|
127
|
+
def __str__(self) -> str:
|
|
128
|
+
"""
|
|
129
|
+
.. admonition:: user string
|
|
130
|
+
|
|
131
|
+
Construct string 'Box()' if empty, otherwise 'Box(item_str)'
|
|
132
|
+
where ``item_str = str(item)`` for the currently contained
|
|
133
|
+
item.
|
|
134
|
+
|
|
135
|
+
:returns: A user meaningful string to represent the current
|
|
136
|
+
state of the ``Box``.
|
|
137
|
+
|
|
138
|
+
"""
|
|
139
|
+
if self:
|
|
140
|
+
return 'Box(' + str(self._item) + ')'
|
|
141
|
+
return 'Box()'
|
|
142
|
+
|
|
127
143
|
@overload
|
|
128
144
|
def get(self) -> T: ...
|
|
129
145
|
@overload
|
|
@@ -136,12 +152,12 @@ class Box[T]:
|
|
|
136
152
|
Return the boxed item, if it exists, otherwise
|
|
137
153
|
an alternate item, if given.
|
|
138
154
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
155
|
+
:param alt: An optional item of type ``T`` to return
|
|
156
|
+
if the ``Box`` is empty.
|
|
157
|
+
:returns: Contents of ``Box`` or an alternate item, if given,
|
|
158
|
+
when the ``Box`` is empty.
|
|
159
|
+
:raises ValueError: When the ``alt`` item is not provided
|
|
160
|
+
but needed.
|
|
145
161
|
|
|
146
162
|
"""
|
|
147
163
|
if self._item is not _sentinel:
|
|
@@ -157,8 +173,8 @@ class Box[T]:
|
|
|
157
173
|
|
|
158
174
|
Pop item from ``Box`` if not empty.
|
|
159
175
|
|
|
160
|
-
|
|
161
|
-
|
|
176
|
+
:returns: The item contained in the ``Box``.
|
|
177
|
+
:raises ValueError: If Box is empty.
|
|
162
178
|
|
|
163
179
|
"""
|
|
164
180
|
if self._item is _sentinel:
|
|
@@ -174,8 +190,8 @@ class Box[T]:
|
|
|
174
190
|
|
|
175
191
|
Push an item into ``Box`` if empty.
|
|
176
192
|
|
|
177
|
-
|
|
178
|
-
|
|
193
|
+
:param item: Item to push into the empty ``Box``.
|
|
194
|
+
:raises ValueError: If ``Box`` is not empty.
|
|
179
195
|
|
|
180
196
|
"""
|
|
181
197
|
if self._item is _sentinel:
|
|
@@ -200,9 +216,9 @@ class Box[T]:
|
|
|
200
216
|
|
|
201
217
|
Exchange an item with what is in the Box.
|
|
202
218
|
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
219
|
+
:param ``new_item``: New item to exchange for current item.
|
|
220
|
+
:returns: Original contents of the ``Box``.
|
|
221
|
+
:raises ValueError: If Box is empty.
|
|
206
222
|
|
|
207
223
|
"""
|
|
208
224
|
if self._item is _sentinel:
|
|
@@ -219,8 +235,8 @@ class Box[T]:
|
|
|
219
235
|
Map function ``f`` over contents. We need to return a new
|
|
220
236
|
instance since the type of Box can change.
|
|
221
237
|
|
|
222
|
-
|
|
223
|
-
|
|
238
|
+
:param f: Mapping function.
|
|
239
|
+
:returns: New instance.
|
|
224
240
|
|
|
225
241
|
"""
|
|
226
242
|
if self._item is _sentinel:
|
|
@@ -233,8 +249,8 @@ class Box[T]:
|
|
|
233
249
|
|
|
234
250
|
Flatmap ``Box`` with function ``f``.
|
|
235
251
|
|
|
236
|
-
|
|
237
|
-
|
|
252
|
+
:param f: Binding function.
|
|
253
|
+
:returns: New instance.
|
|
238
254
|
|
|
239
255
|
"""
|
|
240
256
|
if self._item is _sentinel:
|
pythonic_fp/gadgets/wrap.py
CHANGED
|
@@ -11,15 +11,6 @@
|
|
|
11
11
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
12
|
# See the License for the specific language governing permissions and
|
|
13
13
|
# limitations under the License.
|
|
14
|
-
"""
|
|
15
|
-
.. admonition:: Module wrap
|
|
16
|
-
|
|
17
|
-
Wrap objects in ways to make them "immutable."
|
|
18
|
-
|
|
19
|
-
- Class ``Wrap``: wrap an object
|
|
20
|
-
- Class ``HWrap``: wrap a hashable object
|
|
21
|
-
|
|
22
|
-
"""
|
|
23
14
|
|
|
24
15
|
__all__ = ['Wrap', 'HWrap']
|
|
25
16
|
|
|
@@ -28,11 +19,13 @@ from collections.abc import Callable, Iterator, Hashable
|
|
|
28
19
|
|
|
29
20
|
class Wrap[T]():
|
|
30
21
|
"""
|
|
31
|
-
.. admonition:: Wrap
|
|
22
|
+
.. admonition:: Wrap
|
|
23
|
+
|
|
24
|
+
Immutablely wrap exactly one item.
|
|
32
25
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
26
|
+
.. tip::
|
|
27
|
+
|
|
28
|
+
``Wrap`` objects are matchable.
|
|
36
29
|
|
|
37
30
|
"""
|
|
38
31
|
__slots__ = ('_item',)
|
|
@@ -40,57 +33,55 @@ class Wrap[T]():
|
|
|
40
33
|
|
|
41
34
|
def __init__(self, item: T) -> None:
|
|
42
35
|
"""
|
|
43
|
-
.. admonition::
|
|
36
|
+
.. admonition:: init
|
|
44
37
|
|
|
45
38
|
Initialize ``Wrap`` with 1 required item.
|
|
46
39
|
|
|
47
|
-
|
|
40
|
+
:param item: Item to be wrapped.
|
|
48
41
|
|
|
49
42
|
"""
|
|
50
43
|
self._item = item
|
|
51
44
|
|
|
52
45
|
def __bool__(self) -> bool:
|
|
53
46
|
"""
|
|
54
|
-
.. admonition::
|
|
47
|
+
.. admonition:: bool
|
|
55
48
|
|
|
56
49
|
Truthiness same as wrapped object.
|
|
57
50
|
|
|
58
51
|
"""
|
|
59
52
|
return bool(self._item)
|
|
60
53
|
|
|
61
|
-
def
|
|
54
|
+
def __len__(self) -> int:
|
|
62
55
|
"""
|
|
63
|
-
.. admonition::
|
|
56
|
+
.. admonition:: len
|
|
64
57
|
|
|
65
|
-
|
|
58
|
+
Wrapped items always contain just one item.
|
|
66
59
|
|
|
67
|
-
|
|
68
|
-
if self:
|
|
69
|
-
yield self._item
|
|
60
|
+
:returns: 1
|
|
70
61
|
|
|
71
|
-
def __str__(self) -> str:
|
|
72
62
|
"""
|
|
73
|
-
|
|
63
|
+
return 1
|
|
74
64
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
65
|
+
def __iter__(self) -> Iterator[T]:
|
|
66
|
+
"""
|
|
67
|
+
.. admonition:: iter
|
|
78
68
|
|
|
79
|
-
|
|
69
|
+
:yields: A reference to the wrapped item.
|
|
80
70
|
|
|
81
71
|
"""
|
|
82
|
-
|
|
72
|
+
if self:
|
|
73
|
+
yield self._item
|
|
83
74
|
|
|
84
75
|
def __eq__(self, other: object) -> bool:
|
|
85
76
|
"""
|
|
86
|
-
.. admonition::
|
|
77
|
+
.. admonition:: equality comparison
|
|
87
78
|
|
|
88
|
-
|
|
79
|
+
Compare ``Wrap`` to another object.
|
|
89
80
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
81
|
+
:param other: Object to be compared.
|
|
82
|
+
:returns: ``True`` if ``other`` is of type Wrap and wraps
|
|
83
|
+
an item which compares as equal to the wrapped
|
|
84
|
+
item, otherwise ``False``.
|
|
94
85
|
|
|
95
86
|
"""
|
|
96
87
|
if not isinstance(other, type(self)):
|
|
@@ -100,28 +91,50 @@ class Wrap[T]():
|
|
|
100
91
|
return True
|
|
101
92
|
return self._item == other._item
|
|
102
93
|
|
|
94
|
+
def __repr__(self) -> str:
|
|
95
|
+
"""
|
|
96
|
+
.. admonition:: repr string
|
|
97
|
+
|
|
98
|
+
Construct string 'Wrap(item_str)'
|
|
99
|
+
where ``item_str = repr(item)`` for the contained item.
|
|
100
|
+
|
|
101
|
+
:returns: A string to reproduce of the wrapped item.
|
|
102
|
+
|
|
103
|
+
"""
|
|
104
|
+
return 'Wrap(' + repr(self._item) + ')'
|
|
105
|
+
|
|
106
|
+
def __str__(self) -> str:
|
|
107
|
+
"""
|
|
108
|
+
.. admonition:: user string
|
|
109
|
+
|
|
110
|
+
Construct string 'Wrap(item_str)'
|
|
111
|
+
where ``item_str = str(item)`` for the contained item.
|
|
112
|
+
|
|
113
|
+
:returns: A string meaningful to an end user.
|
|
114
|
+
|
|
115
|
+
"""
|
|
116
|
+
return 'Wrap(' + str(self._item) + ')'
|
|
117
|
+
|
|
103
118
|
def map[U](self, f: Callable[[T], U]) -> 'Wrap[U]':
|
|
104
119
|
"""
|
|
105
|
-
.. admonition::
|
|
120
|
+
.. admonition:: map
|
|
106
121
|
|
|
107
122
|
Map function ``f`` over contents.
|
|
108
123
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
:param f: Mapping function.
|
|
112
|
-
:returns: New instance.
|
|
124
|
+
:param f: Mapping function.
|
|
125
|
+
:returns: New instance.
|
|
113
126
|
|
|
114
127
|
"""
|
|
115
128
|
return Wrap(f(self._item))
|
|
116
129
|
|
|
117
130
|
def bind[U](self, f: Callable[[T], 'Wrap[U]']) -> 'Wrap[U]':
|
|
118
131
|
"""
|
|
119
|
-
.. admonition::
|
|
132
|
+
.. admonition:: bind
|
|
120
133
|
|
|
121
134
|
Flatmap wrapped object with function ``f``.
|
|
122
135
|
|
|
123
|
-
|
|
124
|
-
|
|
136
|
+
:param f: Binding function.
|
|
137
|
+
:returns: New instance.
|
|
125
138
|
|
|
126
139
|
"""
|
|
127
140
|
return f(self._item)
|
|
@@ -129,15 +142,13 @@ class Wrap[T]():
|
|
|
129
142
|
|
|
130
143
|
class HWrap[T: Hashable](Hashable):
|
|
131
144
|
"""
|
|
132
|
-
.. admonition::
|
|
145
|
+
.. admonition:: HWrap
|
|
133
146
|
|
|
134
|
-
Immutablely wrap exactly one
|
|
135
|
-
given hashable type. ``HWrap`` objects can
|
|
136
|
-
be used in Python match statements.
|
|
147
|
+
Immutablely wrap exactly one hashable item.
|
|
137
148
|
|
|
138
149
|
.. tip::
|
|
139
150
|
|
|
140
|
-
``HWrap`` objects are hashable.
|
|
151
|
+
``HWrap`` objects are hashable and matchable.
|
|
141
152
|
|
|
142
153
|
"""
|
|
143
154
|
|
|
@@ -145,6 +156,14 @@ class HWrap[T: Hashable](Hashable):
|
|
|
145
156
|
__match_args__ = ('_item',)
|
|
146
157
|
|
|
147
158
|
def __init__(self, item: T) -> None:
|
|
159
|
+
"""
|
|
160
|
+
.. admonition:: init
|
|
161
|
+
|
|
162
|
+
Initialize ``HWrap`` with 1 required item.
|
|
163
|
+
|
|
164
|
+
:param item: Item to be wrapped.
|
|
165
|
+
|
|
166
|
+
"""
|
|
148
167
|
self._item, self._hash = item, hash(item)
|
|
149
168
|
|
|
150
169
|
def __hash__(self) -> int:
|
|
@@ -152,36 +171,44 @@ class HWrap[T: Hashable](Hashable):
|
|
|
152
171
|
|
|
153
172
|
def __bool__(self) -> bool:
|
|
154
173
|
"""
|
|
155
|
-
.. admonition::
|
|
174
|
+
.. admonition:: bool
|
|
156
175
|
|
|
157
176
|
Truthiness same as wrapped object.
|
|
158
177
|
|
|
159
178
|
"""
|
|
160
179
|
return bool(self._item)
|
|
161
180
|
|
|
181
|
+
def __len__(self) -> int:
|
|
182
|
+
"""
|
|
183
|
+
.. admonition:: len
|
|
184
|
+
|
|
185
|
+
HWrapped items always contain just one item.
|
|
186
|
+
|
|
187
|
+
:returns: 1
|
|
188
|
+
|
|
189
|
+
"""
|
|
190
|
+
return 1
|
|
191
|
+
|
|
162
192
|
def __iter__(self) -> Iterator[T]:
|
|
163
193
|
"""
|
|
164
|
-
.. admonition::
|
|
194
|
+
.. admonition:: iter
|
|
165
195
|
|
|
166
|
-
|
|
196
|
+
:yields: A reference to the wrapped item.
|
|
167
197
|
|
|
168
198
|
"""
|
|
169
199
|
if self:
|
|
170
200
|
yield self._item
|
|
171
201
|
|
|
172
|
-
def __repr__(self) -> str:
|
|
173
|
-
return 'Wrap(' + repr(self._item) + ')'
|
|
174
|
-
|
|
175
202
|
def __eq__(self, other: object) -> bool:
|
|
176
203
|
"""
|
|
177
|
-
.. admonition::
|
|
204
|
+
.. admonition:: equality comparison
|
|
178
205
|
|
|
179
|
-
|
|
206
|
+
Compare ``HWrap`` to another object.
|
|
180
207
|
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
208
|
+
:param other: Object to be compared.
|
|
209
|
+
:returns: ``True`` if ``other`` is of type HWrap and wraps
|
|
210
|
+
an item which compares as equal to the wrapped
|
|
211
|
+
item, otherwise ``False``.
|
|
185
212
|
|
|
186
213
|
"""
|
|
187
214
|
if not isinstance(other, type(self)):
|
|
@@ -193,27 +220,51 @@ class HWrap[T: Hashable](Hashable):
|
|
|
193
220
|
return True
|
|
194
221
|
return self._item == other._item
|
|
195
222
|
|
|
223
|
+
def __repr__(self) -> str:
|
|
224
|
+
"""
|
|
225
|
+
.. admonition:: repr string
|
|
226
|
+
|
|
227
|
+
Construct string 'HWrap(item_str)'
|
|
228
|
+
where ``item_str = repr(item)`` for the contained item.
|
|
229
|
+
|
|
230
|
+
:returns: A string to reproduce of the wrapped object.
|
|
231
|
+
|
|
232
|
+
"""
|
|
233
|
+
return 'Wrap(' + repr(self._item) + ')'
|
|
234
|
+
|
|
235
|
+
def __str__(self) -> str:
|
|
236
|
+
"""
|
|
237
|
+
.. admonition:: user string
|
|
238
|
+
|
|
239
|
+
Construct string 'HWrap(item_str)'
|
|
240
|
+
where ``item_str = str(item)`` for the contained item.
|
|
241
|
+
|
|
242
|
+
:returns: A string meaningful to an end user.
|
|
243
|
+
|
|
244
|
+
"""
|
|
245
|
+
return 'Wrap(' + str(self._item) + ')'
|
|
246
|
+
|
|
196
247
|
def map[U](self, f: Callable[[T], U]) -> 'HWrap[U]':
|
|
197
248
|
"""
|
|
198
|
-
.. admonition::
|
|
249
|
+
.. admonition:: map
|
|
199
250
|
|
|
200
251
|
Map function ``f`` over wrapped the wrapped object
|
|
201
252
|
returning a new ``HWrap`` instance.
|
|
202
253
|
|
|
203
|
-
|
|
204
|
-
|
|
254
|
+
:param f: Mapping function.
|
|
255
|
+
:returns: New instance.
|
|
205
256
|
|
|
206
257
|
"""
|
|
207
258
|
return HWrap(f(self._item))
|
|
208
259
|
|
|
209
260
|
def bind[U](self, f: Callable[[T], 'HWrap[U]']) -> 'HWrap[U]':
|
|
210
261
|
"""
|
|
211
|
-
.. admonition::
|
|
262
|
+
.. admonition:: bind
|
|
212
263
|
|
|
213
264
|
Flatmap ``Box`` with function ``f``.
|
|
214
265
|
|
|
215
|
-
|
|
216
|
-
|
|
266
|
+
:param f: Binding function.
|
|
267
|
+
:returns: New instance.
|
|
217
268
|
|
|
218
269
|
"""
|
|
219
270
|
return f(self._item)
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
2
|
Name: pythonic-fp-gadgets
|
|
3
|
-
Version: 4.0
|
|
4
|
-
Summary: Gadgets
|
|
3
|
+
Version: 4.2.0
|
|
4
|
+
Summary: Gadgets without external Pythonic FP dependencies.
|
|
5
5
|
Keywords: gadgets
|
|
6
6
|
Author-email: "Geoffrey R. Scheller" <geoffrey@scheller.com>
|
|
7
7
|
Requires-Python: >=3.13
|
|
8
|
-
Description-Content-Type: text/
|
|
9
|
-
Classifier: Development Status ::
|
|
8
|
+
Description-Content-Type: text/markdown
|
|
9
|
+
Classifier: Development Status :: 4 - Beta
|
|
10
10
|
Classifier: Framework :: Pytest
|
|
11
11
|
Classifier: Intended Audience :: Developers
|
|
12
12
|
Classifier: License :: OSI Approved :: Apache Software License
|
|
@@ -14,46 +14,37 @@ Classifier: Operating System :: OS Independent
|
|
|
14
14
|
Classifier: Programming Language :: Python :: 3.14
|
|
15
15
|
Classifier: Typing :: Typed
|
|
16
16
|
License-File: LICENSE
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
Project-URL: Changelog, https://github.com/grscheller/pythonic-fp-gadgets/blob/main/CHANGELOG.rst
|
|
20
|
-
Project-URL: Documentation, https://grscheller.github.io/pythonic-fp/projects/gadgets.html
|
|
17
|
+
Project-URL: Changelog, https://github.com/grscheller/pythonic-fp-gadgets/blob/main/CHANGELOG.md
|
|
18
|
+
Project-URL: Documentation, https://grscheller.github.io/pythonic-fp-gadgets/release/html/
|
|
21
19
|
Project-URL: Homepage, https://grscheller.github.io/pythonic-fp/
|
|
22
20
|
Project-URL: Source, https://github.com/grscheller/pythonic-fp-gadgets
|
|
23
|
-
|
|
21
|
+
Import-Name: pythonic_fp.gadgets
|
|
22
|
+
Import-Namespace: pythonic_fp
|
|
24
23
|
|
|
25
|
-
Pythonic FP - Gadgets
|
|
26
|
-
=====================
|
|
27
|
-
|
|
28
|
-
PyPI project
|
|
29
|
-
`pythonic-fp-gadgets
|
|
30
|
-
<https://pypi.org/project/pythonic-fp-gadgets>`_.
|
|
24
|
+
# Pythonic FP - Gadgets
|
|
31
25
|
|
|
32
26
|
Library of simple, but useful, classes and functions with no dependencies
|
|
33
27
|
outside the Python Standard Library.
|
|
34
28
|
|
|
35
|
-
|
|
29
|
+
PyPI project
|
|
30
|
+
[pythonic-fp-gadgets](https://pypi.org/project/pythonic-fp-gadgets).
|
|
31
|
+
Part of the
|
|
32
|
+
[pythonic-fp](https://grscheller.github.io/pythonic-fp/)
|
|
33
|
+
PyPI projects.
|
|
34
|
+
|
|
35
|
+
## Documentation
|
|
36
|
+
|
|
37
|
+
Documentation and other links for this project are hosted on
|
|
38
|
+
[GitHub Pages](https://grscheller.github.io/pythonic-fp/projects/gadgets.html).
|
|
36
39
|
|
|
40
|
+
- Gadgets
|
|
37
41
|
- single item box
|
|
38
42
|
- immutable wrapped (hashable) references
|
|
39
43
|
- function returning iterator of its arguments
|
|
40
44
|
- function to find the latest common ancestor of two classes
|
|
41
45
|
- sentinel values
|
|
42
46
|
|
|
43
|
-
|
|
44
|
-
`pythonic-fp
|
|
45
|
-
<https://grscheller.github.io/pythonic-fp/>`_
|
|
46
|
-
PyPI projects.
|
|
47
|
-
|
|
48
|
-
Documentation
|
|
49
|
-
-------------
|
|
50
|
-
|
|
51
|
-
Documentation and other links for this project are hosted on
|
|
52
|
-
`GitHub Pages
|
|
53
|
-
<https://grscheller.github.io/pythonic-fp/projects/gadgets.html>`_.
|
|
54
|
-
|
|
55
|
-
Copyright and License
|
|
56
|
-
---------------------
|
|
47
|
+
## Copyright and License
|
|
57
48
|
|
|
58
49
|
Copyright (c) 2025-2026 Geoffrey R. Scheller. Licensed under the Apache
|
|
59
50
|
License, Version 2.0. See the LICENSE file for details.
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
pythonic_fp/gadgets/__init__.py,sha256
|
|
2
|
-
pythonic_fp/gadgets/__init__.pyi,sha256=-O921ioE28UPnDm_EL928vl6dDxhrfXHBQenusBo1_o,224
|
|
3
|
-
pythonic_fp/gadgets/box.py,sha256=
|
|
4
|
-
pythonic_fp/gadgets/box.pyi,sha256=UkJBY8Xiv4oe70Q3bhJL1jGHwYmFWwkTIdxvf2zR3v4,837
|
|
5
|
-
pythonic_fp/gadgets/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
|
-
pythonic_fp/gadgets/wrap.py,sha256=
|
|
7
|
-
pythonic_fp/gadgets/wrap.pyi,sha256=TRbBph_517VNCKchwU-pdtPCn73c09gq8EchDFM7Uyo,868
|
|
8
|
-
pythonic_fp/gadgets/sentinels/__init__.py,sha256=Xh63-GTwiqqcBqs5OEYBSiLXuWtq_CVHfUz0mKO_2H0,775
|
|
9
|
-
pythonic_fp/gadgets/sentinels/__init__.pyi,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
10
|
-
pythonic_fp/gadgets/sentinels/flavored.py,sha256=LPmA-XOadcN5gJgxxo2prSnwRvq8bJ7o0Ae2_Y70Au0,2774
|
|
11
|
-
pythonic_fp/gadgets/sentinels/flavored.pyi,sha256=K3YSyXLyylPII2ahRP0olhzLJruOeR73TFJDC6rCUwk,212
|
|
12
|
-
pythonic_fp/gadgets/sentinels/novalue.py,sha256=gaQNm1TRtphbmWgDV8O0sblH7eU2M-Zymu_B67mwsJ8,6097
|
|
13
|
-
pythonic_fp/gadgets/sentinels/novalue.pyi,sha256=1_iUI6FEwYma8P4XXVCb6CKhSYmfq53S8dLmiwNtJw4,244
|
|
14
|
-
pythonic_fp_gadgets-4.0.
|
|
15
|
-
pythonic_fp_gadgets-4.0.
|
|
16
|
-
pythonic_fp_gadgets-4.0.
|
|
17
|
-
pythonic_fp_gadgets-4.0.
|
|
1
|
+
pythonic_fp/gadgets/__init__.py,sha256=zwRgxkaQYUbqjR-kX8pQeuPqipCB1bllVOEVBtGXl6I,2807
|
|
2
|
+
pythonic_fp/gadgets/__init__.pyi,sha256=-O921ioE28UPnDm_EL928vl6dDxhrfXHBQenusBo1_o,224
|
|
3
|
+
pythonic_fp/gadgets/box.py,sha256=gcW9mg-QCjc2lLTcOeqYJK0NAkHAbFs1JxhFjVTW1uQ,7115
|
|
4
|
+
pythonic_fp/gadgets/box.pyi,sha256=UkJBY8Xiv4oe70Q3bhJL1jGHwYmFWwkTIdxvf2zR3v4,837
|
|
5
|
+
pythonic_fp/gadgets/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
|
+
pythonic_fp/gadgets/wrap.py,sha256=Bdi-0rg7x37NWd0ciRi_IeDrsmlKQHJOMY9HcCnKt9M,6465
|
|
7
|
+
pythonic_fp/gadgets/wrap.pyi,sha256=TRbBph_517VNCKchwU-pdtPCn73c09gq8EchDFM7Uyo,868
|
|
8
|
+
pythonic_fp/gadgets/sentinels/__init__.py,sha256=Xh63-GTwiqqcBqs5OEYBSiLXuWtq_CVHfUz0mKO_2H0,775
|
|
9
|
+
pythonic_fp/gadgets/sentinels/__init__.pyi,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
10
|
+
pythonic_fp/gadgets/sentinels/flavored.py,sha256=LPmA-XOadcN5gJgxxo2prSnwRvq8bJ7o0Ae2_Y70Au0,2774
|
|
11
|
+
pythonic_fp/gadgets/sentinels/flavored.pyi,sha256=K3YSyXLyylPII2ahRP0olhzLJruOeR73TFJDC6rCUwk,212
|
|
12
|
+
pythonic_fp/gadgets/sentinels/novalue.py,sha256=gaQNm1TRtphbmWgDV8O0sblH7eU2M-Zymu_B67mwsJ8,6097
|
|
13
|
+
pythonic_fp/gadgets/sentinels/novalue.pyi,sha256=1_iUI6FEwYma8P4XXVCb6CKhSYmfq53S8dLmiwNtJw4,244
|
|
14
|
+
pythonic_fp_gadgets-4.2.0.dist-info/licenses/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
|
|
15
|
+
pythonic_fp_gadgets-4.2.0.dist-info/WHEEL,sha256=lqN8jXt_QloFOGcx9kStvWbryhfEXoI2F2z-YURm350,81
|
|
16
|
+
pythonic_fp_gadgets-4.2.0.dist-info/METADATA,sha256=y8jlrElrd7fYT301AogpTQZ-kcEDVO2aUUpyDt2TMxA,1810
|
|
17
|
+
pythonic_fp_gadgets-4.2.0.dist-info/RECORD,,
|
{pythonic_fp_gadgets-4.0.4.dist-info → pythonic_fp_gadgets-4.2.0.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|