[Python-Dev] slightly misleading Popen.poll() docs

Antoine Pitrou solipsis at pitrou.net
Wed Dec 5 19:55:47 CET 2012


On Thu, 06 Dec 2012 04:15:08 +1100
Steven D'Aprano <steve at pearwood.info> wrote:
> On 06/12/12 03:08, Chris Withers wrote:
> 
> > I'd like to change the docs for poll() to say:
> >
> > """
> > Check if child process has terminated.
> > If it has, the returncode attribute will be set and that value will be returned.
> > If it has not, None will be returned and the returncode attribute will remain None.
> > """
> >
> > Any objections?
> 
> Possibly because it is 4am here, I had to read this three times to understand it.
> How is this instead?
> 
> """
> Check if child process has terminated. Returns None while the child is still running,
> any non-None value means that the child has terminated. In either case, the return
> value is also available from the instance's returncode attribute.
> """

I like this wording.

Regards

Antoine.




More information about the Python-Dev mailing list