Skip to content

Commit bec1317

Browse files
gh-99238: clarify the type of the env dict. (GH-99253)
(cherry picked from commit 2eee9d9) Co-authored-by: Gregory P. Smith <greg@krypto.org>
1 parent b51c283 commit bec1317

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
@@ -80,8 +80,10 @@ underlying :class:`Popen` interface can be used directly.
8080

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

8688
Examples::
8789

@@ -611,7 +613,9 @@ functions.
611613

612614
If *env* is not ``None``, it must be a mapping that defines the environment
613615
variables for the new process; these are used instead of the default
614-
behavior of inheriting the current process' environment.
616+
behavior of inheriting the current process' environment. This mapping can be
617+
str to str on any platform or bytes to bytes on POSIX platforms much like
618+
:data:`os.environ` or :data:`os.environb`.
615619

616620
.. note::
617621

0 commit comments

Comments
 (0)