summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author苏向夜 <fu050409@163.com>2024-01-27 13:26:11 +0800
committer苏向夜 <fu050409@163.com>2024-01-27 13:26:11 +0800
commit26c56c456764baffbefa804fd5e80be2fb5a936d (patch)
treef3c32ee5b22a770e9393c290d6dcf6f0e2ee22b2
parentc367c9490021d28ea18adc6b5c7ac344d9129437 (diff)
downloadinfini-26c56c456764baffbefa804fd5e80be2fb5a936d.tar.gz
infini-26c56c456764baffbefa804fd5e80be2fb5a936d.zip
:construction: to(yield): add todo for iterator supports
-rw-r--r--src/infini/handler.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/infini/handler.py b/src/infini/handler.py
index ae3561f8..dd6c7fd7 100644
--- a/src/infini/handler.py
+++ b/src/infini/handler.py
@@ -14,6 +14,10 @@ class Handler:
return
while not queue.is_empty():
output = queue.pop()(input)
+ # TODO 允许 Handler 函数为迭代器
+ # if isinstance(output, GeneratorType):
+ # for o in output:
+ # yield o
yield output
if output.block:
return