bpo-39759: Fixed os.getenv documentation

This commit is contained in:
Andrey Doroschenko 2020-02-26 15:21:36 +03:00
parent d15d1cc902
commit d4064b688f
2 changed files with 3 additions and 1 deletions

View File

@ -217,7 +217,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.
*default* if it doesn't. Only *key* needs to be a string as it is used to
lookup the value in os.environ.
On Unix, keys and values are decoded with :func:`sys.getfilesystemencoding`
and ``'surrogateescape'`` error handler. Use :func:`os.getenvb` if you

View File

@ -0,0 +1 @@
Fixed os.getenv documentation.