python-iterutils 0.0.4.2__py3-none-any.whl → 0.0.4.3__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.
- iterutils/__init__.py +17 -13
- {python_iterutils-0.0.4.2.dist-info → python_iterutils-0.0.4.3.dist-info}/METADATA +1 -1
- python_iterutils-0.0.4.3.dist-info/RECORD +7 -0
- python_iterutils-0.0.4.2.dist-info/RECORD +0 -7
- {python_iterutils-0.0.4.2.dist-info → python_iterutils-0.0.4.3.dist-info}/LICENSE +0 -0
- {python_iterutils-0.0.4.2.dist-info → python_iterutils-0.0.4.3.dist-info}/WHEEL +0 -0
iterutils/__init__.py
CHANGED
|
@@ -223,25 +223,29 @@ def run_gen_step(
|
|
|
223
223
|
else:
|
|
224
224
|
func = send(ret)
|
|
225
225
|
except StopIteration as e:
|
|
226
|
-
|
|
227
|
-
if as_iter:
|
|
228
|
-
if isawaitable(result):
|
|
229
|
-
result = await result
|
|
230
|
-
try:
|
|
231
|
-
result = aiter(result)
|
|
232
|
-
except TypeError:
|
|
233
|
-
async def wrap(it):
|
|
234
|
-
for val in iter(it):
|
|
235
|
-
yield val
|
|
236
|
-
result = wrap(result)
|
|
237
|
-
return result
|
|
226
|
+
return e.value
|
|
238
227
|
finally:
|
|
239
228
|
if close is not None:
|
|
240
229
|
if threaded:
|
|
241
230
|
await to_thread(close)
|
|
242
231
|
else:
|
|
243
232
|
close()
|
|
244
|
-
|
|
233
|
+
result = process()
|
|
234
|
+
if as_iter:
|
|
235
|
+
async def wrap(result):
|
|
236
|
+
it = await result
|
|
237
|
+
try:
|
|
238
|
+
it = aiter(it)
|
|
239
|
+
except TypeError:
|
|
240
|
+
for val in iter(it):
|
|
241
|
+
if isawaitable(val):
|
|
242
|
+
val = await val
|
|
243
|
+
yield val
|
|
244
|
+
else:
|
|
245
|
+
async for val in it:
|
|
246
|
+
yield val
|
|
247
|
+
result = wrap(result)
|
|
248
|
+
return result
|
|
245
249
|
else:
|
|
246
250
|
try:
|
|
247
251
|
func = send(None)
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
LICENSE,sha256=o5242_N2TgDsWwFhPn7yr8YJNF7XsJM5NxUMtcT97bc,1100
|
|
2
|
+
iterutils/__init__.py,sha256=28I7UIPitCAj72fQsdq__WDN6F2-jsMrJGC-BShgWTQ,7651
|
|
3
|
+
iterutils/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
|
+
python_iterutils-0.0.4.3.dist-info/LICENSE,sha256=o5242_N2TgDsWwFhPn7yr8YJNF7XsJM5NxUMtcT97bc,1100
|
|
5
|
+
python_iterutils-0.0.4.3.dist-info/METADATA,sha256=lfVGyCq0C0HyQf2wkjznLunZmm3vJedXu69VSTOH_bE,1384
|
|
6
|
+
python_iterutils-0.0.4.3.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
|
|
7
|
+
python_iterutils-0.0.4.3.dist-info/RECORD,,
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
LICENSE,sha256=o5242_N2TgDsWwFhPn7yr8YJNF7XsJM5NxUMtcT97bc,1100
|
|
2
|
-
iterutils/__init__.py,sha256=gB8PhcSVF_WfAHRPfHvjTLbO9-A843pA1vdahfKBRpw,7593
|
|
3
|
-
iterutils/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
|
-
python_iterutils-0.0.4.2.dist-info/LICENSE,sha256=o5242_N2TgDsWwFhPn7yr8YJNF7XsJM5NxUMtcT97bc,1100
|
|
5
|
-
python_iterutils-0.0.4.2.dist-info/METADATA,sha256=54xnC2-fhIS14RNphRtI_c_xnLUuT0CDPmjgUPZnZ30,1384
|
|
6
|
-
python_iterutils-0.0.4.2.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
|
|
7
|
-
python_iterutils-0.0.4.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|