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

Skip to content

Commit fc14f1a

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 a2f7280 commit fc14f1a

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
@@ -304,8 +304,8 @@ process and user.
304304

305305
.. function:: getenv(key, default=None)
306306

307-
Return the value of the environment variable *key* if it exists, or
308-
*default* if it doesn't. *key*, *default* and the result are str. Note that
307+
Return the value of the environment variable *key* as a string if it exists, or
308+
*default* if it doesn't. *key* is a string. Note that
309309
since :func:`getenv` uses :data:`os.environ`, the mapping of :func:`getenv` is
310310
similarly also captured on import, and the function may not reflect
311311
future environment changes.
@@ -319,8 +319,8 @@ process and user.
319319

320320
.. function:: getenvb(key, default=None)
321321

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

0 commit comments

Comments
 (0)
0