summaryrefslogtreecommitdiffstats
path: root/Doc/library
diff options
context:
space:
mode:
authorStanley <46876382+slateny@users.noreply.github.com>2022-10-10 13:43:01 (GMT)
committerGitHub <noreply@github.com>2022-10-10 13:43:01 (GMT)
commit187e853690908ca2af19a0701ca7529b43d05df9 (patch)
treeee14822519b79cd21e9c15ddd3e44afab0bbd6b3 /Doc/library
parent571e23d99157ed7ad67ca2334a396fc9ddbe07ec (diff)
downloadcpython-187e853690908ca2af19a0701ca7529b43d05df9.zip
cpython-187e853690908ca2af19a0701ca7529b43d05df9.tar.gz
cpython-187e853690908ca2af19a0701ca7529b43d05df9.tar.bz2
gh-83940: os docs: Improve wording for getenv/getenvb (#98113)
Diffstat (limited to 'Doc/library')
-rw-r--r--Doc/library/os.rst8
1 files changed, 4 insertions, 4 deletions
diff --git a/Doc/library/os.rst b/Doc/library/os.rst
index 8727f81..43066fa 100644
--- a/Doc/library/os.rst
+++ b/Doc/library/os.rst
@@ -304,8 +304,8 @@ process and user.
.. function:: getenv(key, default=None)
- Return the value of the environment variable *key* if it exists, or
- *default* if it doesn't. *key*, *default* and the result are str. Note that
+ Return the value of the environment variable *key* as a string if it exists, or
+ *default* if it doesn't. *key* is a string. Note that
since :func:`getenv` uses :data:`os.environ`, the mapping of :func:`getenv` is
similarly also captured on import, and the function may not reflect
future environment changes.
@@ -319,8 +319,8 @@ process and user.
.. function:: getenvb(key, default=None)
- Return the value of the environment variable *key* if it exists, or
- *default* if it doesn't. *key*, *default* and the result are bytes. Note that
+ Return the value of the environment variable *key* as bytes if it exists, or
+ *default* if it doesn't. *key* must be bytes. Note that
since :func:`getenvb` uses :data:`os.environb`, the mapping of :func:`getenvb` is
similarly also captured on import, and the function may not reflect
future environment changes.