gh-101754: Document that Windows converts keys in `os.environ` to uppercase (GH-101840)

This commit is contained in:
Owain Davies 2023-03-03 17:51:32 +07:00 committed by GitHub
parent 12011dd8ba
commit 4e7c0cbf59
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View 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