omlish 0.0.0.dev331__py3-none-any.whl → 0.0.0.dev332__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.
- omlish/__about__.py +2 -2
- omlish/lang/__init__.py +1 -0
- omlish/lang/iterables.py +34 -0
- {omlish-0.0.0.dev331.dist-info → omlish-0.0.0.dev332.dist-info}/METADATA +1 -1
- {omlish-0.0.0.dev331.dist-info → omlish-0.0.0.dev332.dist-info}/RECORD +9 -9
- {omlish-0.0.0.dev331.dist-info → omlish-0.0.0.dev332.dist-info}/WHEEL +0 -0
- {omlish-0.0.0.dev331.dist-info → omlish-0.0.0.dev332.dist-info}/entry_points.txt +0 -0
- {omlish-0.0.0.dev331.dist-info → omlish-0.0.0.dev332.dist-info}/licenses/LICENSE +0 -0
- {omlish-0.0.0.dev331.dist-info → omlish-0.0.0.dev332.dist-info}/top_level.txt +0 -0
omlish/__about__.py
CHANGED
omlish/lang/__init__.py
CHANGED
omlish/lang/iterables.py
CHANGED
@@ -121,3 +121,37 @@ def prodrange(*dims: Rangeable) -> ta.Iterable[ta.Sequence[int]]:
|
|
121
121
|
if not dims:
|
122
122
|
return []
|
123
123
|
return itertools.product(*map(asrange, dims))
|
124
|
+
|
125
|
+
|
126
|
+
##
|
127
|
+
|
128
|
+
|
129
|
+
class IteratorWithReturn(ta.Generic[T, R]):
|
130
|
+
"""Overlap with stuff in generators.py, but intentionally restricted to iteration (no send/throw)."""
|
131
|
+
|
132
|
+
def __init__(self, it: ta.Iterator[T]) -> None:
|
133
|
+
super().__init__()
|
134
|
+
|
135
|
+
self._it = it
|
136
|
+
self._has_value = False
|
137
|
+
|
138
|
+
_value: R
|
139
|
+
|
140
|
+
@property
|
141
|
+
def has_value(self) -> bool:
|
142
|
+
return self._has_value
|
143
|
+
|
144
|
+
@property
|
145
|
+
def value(self) -> R:
|
146
|
+
return self._value
|
147
|
+
|
148
|
+
def __iter__(self):
|
149
|
+
return self
|
150
|
+
|
151
|
+
def __next__(self):
|
152
|
+
try:
|
153
|
+
return next(self._it)
|
154
|
+
except StopIteration as e:
|
155
|
+
self._has_value = True
|
156
|
+
self._value = e.value
|
157
|
+
raise
|
@@ -1,5 +1,5 @@
|
|
1
1
|
omlish/.manifests.json,sha256=orgsRvtpHu8tdhaCvlP9v3P495OJopYYiHKjK68WtWg,8587
|
2
|
-
omlish/__about__.py,sha256=
|
2
|
+
omlish/__about__.py,sha256=r6XTgLXcL6l8jSyx01oleAawjO4edY2vAJ_QO-jMZvY,3478
|
3
3
|
omlish/__init__.py,sha256=SsyiITTuK0v74XpKV8dqNaCmjOlan1JZKrHQv5rWKPA,253
|
4
4
|
omlish/c3.py,sha256=rer-TPOFDU6fYq_AWio_AmA-ckZ8JDY5shIzQ_yXfzA,8414
|
5
5
|
omlish/cached.py,sha256=MLap_p0rdGoDIMVhXVHm1tsbcWobJF0OanoodV03Ju8,542
|
@@ -404,7 +404,7 @@ omlish/iterators/iterators.py,sha256=RxW35yQ5ed8vBQ22IqpDXFx-i5JiLQdp7-pkMZXhJJ8
|
|
404
404
|
omlish/iterators/recipes.py,sha256=wOwOZg-zWG9Zc3wcAxJFSe2rtavVBYwZOfG09qYEx_4,472
|
405
405
|
omlish/iterators/tools.py,sha256=tdtWhwkPQq3sg7Brakrcbf8e1cOBg6e0TtwnSMnvEpg,2582
|
406
406
|
omlish/iterators/unique.py,sha256=Nw0pSaNEcHAkve0ugfLPvJcirDOn9ECyC5wIL8JlJKI,1395
|
407
|
-
omlish/lang/__init__.py,sha256=
|
407
|
+
omlish/lang/__init__.py,sha256=YuPEZ3sIP6q5gGbISbQQ_CsOU5Zlu_IXHqxjO7muI-4,6251
|
408
408
|
omlish/lang/attrs.py,sha256=i7euRF81uNF8QDmUVXSK_BtqLGshaMi4VVdUnMjiMwg,5050
|
409
409
|
omlish/lang/casing.py,sha256=cFUlbDdXLhwnWwcYx4qnM5c4zGX7hIRUfcjiZbxUD28,4636
|
410
410
|
omlish/lang/clsdct.py,sha256=HAGIvBSbCefzRjXriwYSBLO7QHKRv2UsE78jixOb-fA,1828
|
@@ -417,7 +417,7 @@ omlish/lang/enums.py,sha256=F9tflHfaAoV2MpyuhZzpfX9-H55M3zNa9hCszsngEo8,111
|
|
417
417
|
omlish/lang/functions.py,sha256=qNqzWF6vI6PGTzKhgkhnNXP8e1gSerb8GsHG3_wVBP8,6386
|
418
418
|
omlish/lang/generators.py,sha256=a4D5HU_mySs2T2z3xCmE_s3t4QJkj0YRrK4-hhpGd0A,5197
|
419
419
|
omlish/lang/imports.py,sha256=y9W9Y-d_cQ35QCLuSIPoa6vnEqSErFCz8b-34IH128U,10552
|
420
|
-
omlish/lang/iterables.py,sha256=
|
420
|
+
omlish/lang/iterables.py,sha256=krehpKGdOI5ZxqChS7pse5Kzj1B9M4qk4ruFnUdNtiE,2842
|
421
421
|
omlish/lang/objects.py,sha256=ZsibJwNp1EXorbaObm9TlCNtuuM65snCmVb7H4_llqI,6116
|
422
422
|
omlish/lang/outcomes.py,sha256=mpFy_VoM-b74L1aCFsjsZVUHx_icZ1AHMOKeVesjOp4,8628
|
423
423
|
omlish/lang/overrides.py,sha256=IBzK6ljfLX6TLgIyKTSjhqTLcuKRkQNVtEOnBLS4nuA,2095
|
@@ -857,9 +857,9 @@ omlish/typedvalues/holder.py,sha256=vu-umn-h1nvUqmtV5T9ZfQ_OoOYsERu8PhI2N48Ryns,
|
|
857
857
|
omlish/typedvalues/marshal.py,sha256=pGA4qzAmpqJTeUya4sTSNEkuXoyUdg5l_XTotR8v9SU,4694
|
858
858
|
omlish/typedvalues/reflect.py,sha256=PAvKW6T4cW7u--iX80w3HWwZUS3SmIZ2_lQjT65uAyk,1026
|
859
859
|
omlish/typedvalues/values.py,sha256=ym46I-q2QJ_6l4UlERqv3yj87R-kp8nCKMRph0xQ3UA,1307
|
860
|
-
omlish-0.0.0.
|
861
|
-
omlish-0.0.0.
|
862
|
-
omlish-0.0.0.
|
863
|
-
omlish-0.0.0.
|
864
|
-
omlish-0.0.0.
|
865
|
-
omlish-0.0.0.
|
860
|
+
omlish-0.0.0.dev332.dist-info/licenses/LICENSE,sha256=B_hVtavaA8zCYDW99DYdcpDLKz1n3BBRjZrcbv8uG8c,1451
|
861
|
+
omlish-0.0.0.dev332.dist-info/METADATA,sha256=OxcNh3fpYssk2Yi1ivKcjcmtZbBWFloHT6Zr8LoQtw8,4416
|
862
|
+
omlish-0.0.0.dev332.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
863
|
+
omlish-0.0.0.dev332.dist-info/entry_points.txt,sha256=Lt84WvRZJskWCAS7xnQGZIeVWksprtUHj0llrvVmod8,35
|
864
|
+
omlish-0.0.0.dev332.dist-info/top_level.txt,sha256=pePsKdLu7DvtUiecdYXJ78iO80uDNmBlqe-8hOzOmfs,7
|
865
|
+
omlish-0.0.0.dev332.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|