summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2022-10-10 14:01:17 (GMT)
committerGitHub <noreply@github.com>2022-10-10 14:01:17 (GMT)
commitde745870e600e38fe7c753c461d22e9debad7f66 (patch)
treee0e7544c6b03d3ca4f4394db882e8c799ef4a409 /Doc
parent8827b95e80302ef19d19561fdcd81c6efde2ecdb (diff)
downloadcpython-de745870e600e38fe7c753c461d22e9debad7f66.zip
cpython-de745870e600e38fe7c753c461d22e9debad7f66.tar.gz
cpython-de745870e600e38fe7c753c461d22e9debad7f66.tar.bz2
gh-83940: os docs: Improve wording for getenv/getenvb (GH-98113)
(cherry picked from commit 187e853690908ca2af19a0701ca7529b43d05df9) Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
Diffstat (limited to 'Doc')
-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 58f01e9..8753132 100644
--- a/Doc/library/os.rst
+++ b/Doc/library/os.rst
@@ -291,8 +291,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.
@@ -306,8 +306,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.