Skip to content

Commit

Permalink
pythongh-83940: os docs: Improve wording for getenv/getenvb (python#9…
Browse files Browse the repository at this point in the history
  • Loading branch information
slateny authored and mpage committed Oct 11, 2022
1 parent 096a6a0 commit 70a2708
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Doc/library/os.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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.
Expand Down

0 comments on commit 70a2708

Please sign in to comment.