summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOwain Davies <116417456+OTheDev@users.noreply.github.com>2023-03-03 10:51:32 (GMT)
committerGitHub <noreply@github.com>2023-03-03 10:51:32 (GMT)
commit4e7c0cbf59595714848cf9827f6e5b40c3985924 (patch)
tree52163f13b03db3f2fe7ef1c2cd9616aaa40509c2
parent12011dd8bafa6867f2b4a8a9e8e54cb0fbf006e4 (diff)
downloadcpython-4e7c0cbf59595714848cf9827f6e5b40c3985924.zip
cpython-4e7c0cbf59595714848cf9827f6e5b40c3985924.tar.gz
cpython-4e7c0cbf59595714848cf9827f6e5b40c3985924.tar.bz2
gh-101754: Document that Windows converts keys in `os.environ` to uppercase (GH-101840)
-rw-r--r--Doc/library/os.rst5
1 files changed, 5 insertions, 0 deletions
diff --git a/Doc/library/os.rst b/Doc/library/os.rst
index 85924d0..23ce987 100644
--- a/Doc/library/os.rst
+++ b/Doc/library/os.rst
@@ -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