8000 gh-83940: os docs: Improve wording for getenv/getenvb (GH-98113) · python/cpython@de74587 · GitHub
[go: up one dir, main page]

Skip to content

Commit de74587

Browse files
gh-83940: os docs: Improve wording for getenv/getenvb (GH-98113)
(cherry picked from commit 187e853) Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
1 parent 8827b95 commit de74587

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Doc/library/os.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -291,8 +291,8 @@ process and user.
291291

292292
.. function:: getenv(key, default=None)
293293

294-
Return the value of the environment variable *key* if it exists, or
295-
*default* if it doesn't. *key*, *default* and the result are str. Note that
294+
Return the value of the environment variable *key* as a string if it exists, or
295+
*default* if it doesn't. *key* is a string. Note that
296296
since :func:`getenv` uses :data:`os.environ`, the mapping of :func:`getenv` is
297297
similarly also captured on import, and the function may not reflect
298298
future environment changes.
@@ -306,8 +306,8 @@ process and user.
306306

307307
.. function:: getenvb(key, default=None)
308308

309-
Return the value of the environment variable *key* if it exists, or
310-
*default* if it doesn't. *key*, *default* and the result are bytes. Note that
309+
Return the value of the environment variable *key* as bytes if it exists, or
310+
*default* if it doesn't. *key* must be bytes. Note that
311311
since :func:`getenvb` uses :data:`os.environb`, the mapping of :func:`getenvb` is
312312
similarly also captured on import, and the function may not reflect
313313
future environment changes.

0 commit comments

Comments
 (0)
0