mirror of
https://github.com/python/cpython.git
synced 2025-10-03 13:45:29 +00:00
gh-101754: Document that Windows converts keys in os.environ
to uppercase (GH-101840)
(cherry picked from commit 4e7c0cbf59
)
Co-authored-by: Owain Davies <116417456+OTheDev@users.noreply.github.com>
This commit is contained in:
parent
3b1201daf6
commit
32a738e5b3
1 changed files with 5 additions and 0 deletions
|
@ -201,6 +201,11 @@ process and user.
|
||||||
``'surrogateescape'`` error handler. Use :data:`environb` if you would like
|
``'surrogateescape'`` error handler. Use :data:`environb` if you would like
|
||||||
to use a different encoding.
|
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::
|
.. note::
|
||||||
|
|
||||||
Calling :func:`putenv` directly does not change :data:`os.environ`, so it's better
|
Calling :func:`putenv` directly does not change :data:`os.environ`, so it's better
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue