]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-83940: os docs: Improve wording for getenv/getenvb (#98113)
authorStanley <46876382+slateny@users.noreply.github.com>
Mon, 10 Oct 2022 13:43:01 +0000 (06:43 -0700)
committerGitHub <noreply@github.com>
Mon, 10 Oct 2022 13:43:01 +0000 (06:43 -0700)
Doc/library/os.rst

index 8727f811def1c09ce3e781ca7e9f8a89a62516a9..43066fa1e13d74b0d3676edfbb9bf09ee11fb6a3 100644 (file)
@@ -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.