提交 608de7c0 编写于 作者: H Helin Wang

fix according to comments

上级 2a21681c
...@@ -66,7 +66,7 @@ def chain(*readers): ...@@ -66,7 +66,7 @@ def chain(*readers):
[0, 0, 0, 1, 1, 1, 2, 2, 2] [0, 0, 0, 1, 1, 1, 2, 2, 2]
Args: Args:
readerss: input readers. readers: input readers.
Returns: Returns:
the new data reader. the new data reader.
...@@ -83,7 +83,7 @@ def chain(*readers): ...@@ -83,7 +83,7 @@ def chain(*readers):
return reader return reader
class ComposeNotAligned: class ComposeNotAligned(ValueError):
pass pass
...@@ -128,7 +128,8 @@ def compose(*readers, **kwargs): ...@@ -128,7 +128,8 @@ def compose(*readers, **kwargs):
for o in outputs: for o in outputs:
if o is None: if o is None:
# None will be not be present if compose is aligned # None will be not be present if compose is aligned
raise ComposeNotAligned raise ComposeNotAligned(
"outputs of readers are not aligned.")
yield sum(map(make_tuple, outputs), ()) yield sum(map(make_tuple, outputs), ())
return reader return reader
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册