FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[3.10] bpo-45600: Enhanced / clarified the docs for os.environ and os.environb (GH-29204) by miss-islington · Pull Request #29322 · python/cpython · GitHub

Repository navigation

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .rst  (1) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
15 changes: 8 additions & 7 deletions Doc/library/os.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,10 @@ process and user.

.. data:: environ

A :term:`mapping` object representing the string environment. For example,
``environ['HOME']`` is the pathname of your home directory (on some platforms),
and is equivalent to ``getenv("HOME")`` in C.
A :term:`mapping` object where keys and values are strings that represent
the process environment. For example, ``environ['HOME']`` is the pathname
of your home directory (on some platforms), and is equivalent to
``getenv("HOME")`` in C.

This mapping is captured the first time the :mod:`os` module is imported,
typically during Python startup as part of processing :file:`site.py`. Changes
Expand Down Expand Up @@ -209,10 +210,10 @@ process and user.

.. data:: environb

Bytes version of :data:`environ`: a :term:`mapping` object representing the
environment as byte strings. :data:`environ` and :data:`environb` are
synchronized (modify :data:`environb` updates :data:`environ`, and vice
versa).
Bytes version of :data:`environ`: a :term:`mapping` object where both keys
and values are :class:`bytes` objects representing the process environment.
:data:`environ` and :data:`environb` are synchronized (modifying
:data:`environb` updates :data:`environ`, and vice versa).

:data:`environb` is only available if :data:`supports_bytes_environ` is
``True``.
Expand Down

Back | FazBrowse Home | New Git URL