summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2022-11-08 21:08:08 (GMT)
committerGitHub <noreply@github.com>2022-11-08 21:08:08 (GMT)
commitbec131759e5852e929c3b048dbb1d6126813d9fa (patch)
tree5e1d5165bfb2278421dd964b047507f9d40194bd
parentb51c2832f08bcbe7dfee563c77e61c1db08bc7af (diff)
downloadcpython-bec131759e5852e929c3b048dbb1d6126813d9fa.zip
cpython-bec131759e5852e929c3b048dbb1d6126813d9fa.tar.gz
cpython-bec131759e5852e929c3b048dbb1d6126813d9fa.tar.bz2
gh-99238: clarify the type of the env dict. (GH-99253)
(cherry picked from commit 2eee9d9cd7eb1e396fa9a4af7c5fadeeafbdaa38) Co-authored-by: Gregory P. Smith <greg@krypto.org>
-rw-r--r--Doc/library/subprocess.rst10
1 files changed, 7 insertions, 3 deletions
diff --git a/Doc/library/subprocess.rst b/Doc/library/subprocess.rst
index f35a820..ae1cb8f 100644
--- a/Doc/library/subprocess.rst
+++ b/Doc/library/subprocess.rst
@@ -80,8 +80,10 @@ underlying :class:`Popen` interface can be used directly.
If *env* is not ``None``, it must be a mapping that defines the environment
variables for the new process; these are used instead of the default
- behavior of inheriting the current process' environment. It is passed directly
- to :class:`Popen`.
+ behavior of inheriting the current process' environment. It is passed
+ directly to :class:`Popen`. This mapping can be str to str on any platform
+ or bytes to bytes on POSIX platforms much like :data:`os.environ` or
+ :data:`os.environb`.
Examples::
@@ -611,7 +613,9 @@ functions.
If *env* is not ``None``, it must be a mapping that defines the environment
variables for the new process; these are used instead of the default
- behavior of inheriting the current process' environment.
+ behavior of inheriting the current process' environment. This mapping can be
+ str to str on any platform or bytes to bytes on POSIX platforms much like
+ :data:`os.environ` or :data:`os.environb`.
.. note::