]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-101754: Document that Windows converts keys in `os.environ` to uppercase (GH-101840)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 3 Mar 2023 11:00:06 +0000 (03:00 -0800)
committerGitHub <noreply@github.com>
Fri, 3 Mar 2023 11:00:06 +0000 (03:00 -0800)
(cherry picked from commit 4e7c0cbf59595714848cf9827f6e5b40c3985924)

Co-authored-by: Owain Davies <116417456+OTheDev@users.noreply.github.com>
Doc/library/os.rst

index 759064a6e52e8a381bb09e88a547f2b2c17f09a6..e3e20510f8093c08ba6fdd9453077a7ba0561209 100644 (file)
@@ -201,6 +201,11 @@ process and user.
    ``'surrogateescape'`` error handler. Use :data:`environb` if you would like
    to use a different encoding.
 
+   On Windows, the keys are converted to uppercase. This also applies when
+   getting, setting, or deleting an item. For example,
+   ``environ['monty'] = 'python'`` maps the key ``'MONTY'`` to the value
+   ``'python'``.
+
    .. note::
 
       Calling :func:`putenv` directly does not change :data:`os.environ`, so it's better