def source(self, value):
if value is self._source:
return
if self.active:
raise RuntimeError("Cannot set the source while active")
if not (isinstance(value, collections.abc.AsyncIterable) or
callable(value)):
raise RuntimeError("The source must be and async iterable or a "
"callable returning an async generator")
self._source = value
评论列表
文章目录