首页 > 解决方案 > process.poll() 的类型返回值“returncode”

问题描述

我在哪里可以找到returncodeProcess.poll 返回的类型?从文档中“显示”该类型是整数值,因为返回码可能是负数;但是有可能知道确切的类型吗?

我问是因为在我的代码库中我收到警告:

SyntaxWarning: "is" with a literal. Did you mean "=="?
  exists = returncode is 0

一旦我知道确切的类型,我想解决这个问题returncode

标签: pythonsubprocess

解决方案


推荐阅读