[Python-checkins] bpo-40707: Document that Popen.communicate sets the returncode attribute (GH-20283)
Miss Islington (bot)
webhook-mailer at python.org
Tue Jun 23 23:19:44 EDT 2020
https://github.com/python/cpython/commit/4f5dde463b588fc97cacb4a1905eb422b16daa37
commit: 4f5dde463b588fc97cacb4a1905eb422b16daa37
branch: 3.8
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: GitHub <noreply at github.com>
date: 2020-06-23T20:19:35-07:00
summary:
bpo-40707: Document that Popen.communicate sets the returncode attribute (GH-20283)
(cherry picked from commit bf2e515fa43406d4bd9c4c53ecc9364034d8f9f6)
Co-authored-by: Gareth Rees <gdr at garethrees.org>
files:
M Doc/library/subprocess.rst
diff --git a/Doc/library/subprocess.rst b/Doc/library/subprocess.rst
index a0152a8009179..a93a6c186f8d8 100644
--- a/Doc/library/subprocess.rst
+++ b/Doc/library/subprocess.rst
@@ -704,10 +704,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,
More information about the Python-checkins
mailing list