8000 gh-101754: Document that Windows converts keys in `os.environ` to upp… · python/cpython@32a738e · GitHub
[go: up one dir, main page]

Skip to content

Commit 32a738e

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 <116417456+OTheDev@users.noreply.github.com>
1 parent 3b1201d commit 32a738e

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
@@ -201,6 +201,11 @@ process and user.
201201
``'surrogateescape'`` error handler. Use :data:`environb` if you would like
202202
to use a different encoding.
203203

204+
On Windows, the keys are converted to uppercase. This also applies when
205+
getting, setting, or deleting an item. For example,
206+
``environ['monty'] = 'python'`` maps the key ``'MONTY'`` to the value
207+
``'python'``.
208+
204209
.. note::
205210

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

0 commit comments

Comments
 (0)
0