Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/339.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 如何在RxPy中使用键入?_Python_Types_System.reactive_Reactive_Typing - Fatal编程技术网

Python 如何在RxPy中使用键入?

Python 如何在RxPy中使用键入?,python,types,system.reactive,reactive,typing,Python,Types,System.reactive,Reactive,Typing,我不太清楚如何在RxPy中使用打字。我目前正在做这件事,这很有效: b: rx.typing.Subject[int, int] = Subject() b.pipe( ops.map(lambda a: a + 1) ) b.on_next(1) IDE(PyCharm)警告我,如果下一步获取的输入值类型错误。但是我的IDE错误地说我的主题没有pipe方法。似乎IDE不知道,主体也是可观察的。我是否必须明确声明主题是多种类型的混合体

我不太清楚如何在RxPy中使用打字。我目前正在做这件事,这很有效:

b: rx.typing.Subject[int, int] = Subject()
b.pipe(
    ops.map(lambda a: a + 1)
)
b.on_next(1)
IDE(PyCharm)警告我,如果下一步
获取的输入值类型错误。但是我的IDE错误地说我的主题没有
pipe
方法。似乎IDE不知道,主体也是可观察的。我是否必须明确声明主题是多种类型的混合体