Skip to content

Commit 00147a8

Browse files
gh-99238: clarify the type of the env dict. (GH-99253)
(cherry picked from commit 2eee9d9) Co-authored-by: Gregory P. Smith <[email protected]>
1 parent 4f31171 commit 00147a8

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

Doc/library/subprocess.rst

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,10 @@ underlying :class:`Popen` interface can be used directly.
8181

8282
If *env* is not ``None``, it must be a mapping that defines the environment
8383
variables for the new process; these are used instead of the default
84-
behavior of inheriting the current process' environment. It is passed directly
85-
to :class:`Popen`.
84+
behavior of inheriting the current process' environment. It is passed
85+
directly to :class:`Popen`. This mapping can be str to str on any platform
86+
or bytes to bytes on POSIX platforms much like :data:`os.environ` or
87+
:data:`os.environb`.
8688

8789
Examples::
8890

@@ -619,7 +621,9 @@ functions.
619621

620622
If *env* is not ``None``, it must be a mapping that defines the environment
621623
variables for the new process; these are used instead of the default
622-
behavior of inheriting the current process' environment.
624+
behavior of inheriting the current process' environment. This mapping can be
625+
str to str on any platform or bytes to bytes on POSIX platforms much like
626+
:data:`os.environ` or :data:`os.environb`.
623627

624628
.. note::
625629

0 commit comments

Comments
 (0)