[docs] [issue31065] Documentation for Popen.poll is unclear

Mark Dickinson report at bugs.python.org
Fri Jul 28 11:30:51 EDT 2017


Mark Dickinson added the comment:

Right, after following the source, I realise that `poll` is indeed returning `self.returncode` in all cases, and if the process hasn't terminated yet then `self.returncode` is still at its initial value of `None`.

I can think of other ways that the result could potentially be indicated, though: when I poll, I'm asking whether the child process is still running or not, so a boolean result wouldn't be unreasonable. Or perhaps an exception (like doing `get(block=False)` on a queue does). I don't there's a good reason not to be explicit here.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue31065>
_______________________________________


More information about the docs mailing list