We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a48bf9a commit 4cda3f9Copy full SHA for 4cda3f9
src/basilisp/core.lpy
@@ -4101,13 +4101,13 @@
4101
(let [bound-name (first binding)
4102
iter (second binding)]
4103
`(let [it# (. ~iter ~'__aiter__)]
4104
- (loop [is-running?# true]
4105
- (when is-running?#
4106
- (try
4107
- (let [~bound-name (await (. it# ~'__anext__))]
4108
- ~@body)
4109
- (catch python/StopAsyncIteration _
4110
- (recur false))))))))
+ (loop [val# nil]
+ (try
+ (let [~bound-name (await (. it# ~'__anext__))
+ result# (do ~@body)]
+ (recur result#))
+ (catch python/StopAsyncIteration _
+ val#))))))
4111
4112
(defmacro awith
4113
"Evaluate ``body`` within a ``try`` / ``except`` expression, binding the named
0 commit comments