From 26c56c456764baffbefa804fd5e80be2fb5a936d Mon Sep 17 00:00:00 2001 From: 苏向夜 Date: Sat, 27 Jan 2024 13:26:11 +0800 Subject: :construction: to(yield): add todo for iterator supports --- src/infini/handler.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') 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 -- cgit v1.2.3-70-g09d2