]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-40707: Document that Popen.communicate sets the returncode attribute (GH-20283)
authorGareth Rees <gdr@garethrees.org>
Wed, 24 Jun 2020 03:12:10 +0000 (04:12 +0100)
committerGitHub <noreply@github.com>
Wed, 24 Jun 2020 03:12:10 +0000 (23:12 -0400)
Doc/library/subprocess.rst

index 5988bd35e72b1232fcd8747378e7b7a1f0467594..e37cc980e97575070d6ab9803a5bd487b2dee063 100644 (file)
@@ -738,10 +738,11 @@ Instances of the :class:`Popen` class have the following methods:
 .. method:: Popen.communicate(input=None, timeout=None)
 
    Interact with process: Send data to stdin.  Read data from stdout and stderr,
-   until end-of-file is reached.  Wait for process to terminate.  The optional
-   *input* argument should be data to be sent to the child process, or
-   ``None``, if no data should be sent to the child.  If streams were opened in
-   text mode, *input* must be a string.  Otherwise, it must be bytes.
+   until end-of-file is reached.  Wait for process to terminate and set the
+   :attr:`~Popen.returncode` attribute.  The optional *input* argument should be
+   data to be sent to the child process, or ``None``, if no data should be sent
+   to the child.  If streams were opened in text mode, *input* must be a string.
+   Otherwise, it must be bytes.
 
    :meth:`communicate` returns a tuple ``(stdout_data, stderr_data)``.
    The data will be strings if streams were opened in text mode; otherwise,