Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/295.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 如果我不';我什么也没写?_Python_Python 2.7_Twisted - Fatal编程技术网

Python 如果我不';我什么也没写?

Python 如果我不';我什么也没写?,python,python-2.7,twisted,Python,Python 2.7,Twisted,我正在实现一个IPullProducer。因此,调用方告诉我何时必须生成数据 如果我暂时无法做到这一点(也许在等待其他事件),该怎么办 有没有办法告诉消费者我暂时无法生成数据?没有。IPullProducer必须始终能够按需同步生成数据;这就是接口存在的原因 也许你想要一个IPushProducer?Bugger。是的,我想我最终会使用IPushProducer并添加一些粘合代码。

我正在实现一个
IPullProducer
。因此,调用方告诉我何时必须生成数据

如果我暂时无法做到这一点(也许在等待其他事件),该怎么办


有没有办法告诉消费者我暂时无法生成数据?

没有。
IPullProducer
必须始终能够按需同步生成数据;这就是接口存在的原因


也许你想要一个
IPushProducer

Bugger。是的,我想我最终会使用IPushProducer并添加一些粘合代码。