diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2023-03-03 10:58:30 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-03 10:58:30 (GMT) |
commit | 3d88b4e51a08d20c9325491226763a70eff164f8 (patch) | |
tree | da74e8422c02cd30a15f7a4379b7212466763f15 | |
parent | 47cc6fac4b871f97a9fab30cea4b6465571db2fb (diff) | |
download | cpython-3d88b4e51a08d20c9325491226763a70eff164f8.zip cpython-3d88b4e51a08d20c9325491226763a70eff164f8.tar.gz cpython-3d88b4e51a08d20c9325491226763a70eff164f8.tar.bz2 |
gh-101754: Document that Windows converts keys in `os.environ` to uppercase (GH-101840)
(cherry picked from commit 4e7c0cbf59595714848cf9827f6e5b40c3985924)
Co-authored-by: Owain Davies <116417456+OTheDev@users.noreply.github.com>
-rw-r--r-- | Doc/library/os.rst | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Doc/library/os.rst b/Doc/library/os.rst index e5fc63a..1f1e2fd 100644 --- a/Doc/library/os.rst +++ b/Doc/library/os.rst @@ -188,6 +188,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 |