Skip to content

Commit 3d88b4e

Browse files
gh-101754: Document that Windows converts keys in os.environ to uppercase (GH-101840)
(cherry picked from commit 4e7c0cb) Co-authored-by: Owain Davies <[email protected]>
1 parent 47cc6fa commit 3d88b4e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Doc/library/os.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,11 @@ process and user.
188188
``'surrogateescape'`` error handler. Use :data:`environb` if you would like
189189
to use a different encoding.
190190

191+
On Windows, the keys are converted to uppercase. This also applies when
192+
getting, setting, or deleting an item. For example,
193+
``environ['monty'] = 'python'`` maps the key ``'MONTY'`` to the value
194+
``'python'``.
195+
191196
.. note::
192197

193198
Calling :func:`putenv` directly does not change :data:`os.environ`, so it's better

0 commit comments

Comments
 (0)