diff options
author | andrei kulakov <andrei.avk@gmail.com> | 2021-10-29 20:18:45 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-29 20:18:45 (GMT) |
commit | b17cfd150f4dc2816975d304a71110a2d445eaf0 (patch) | |
tree | 037eee5b5f769c42ac3f34b85e21ebd289358151 /Doc | |
parent | 3877fc02f7a8801ba5ce0e94b6075b3fdd9778d0 (diff) | |
download | cpython-b17cfd150f4dc2816975d304a71110a2d445eaf0.zip cpython-b17cfd150f4dc2816975d304a71110a2d445eaf0.tar.gz cpython-b17cfd150f4dc2816975d304a71110a2d445eaf0.tar.bz2 |
bpo-45600: Enhanced / clarified the docs for os.environ and os.environb (GH-29204)
Co-authored-by: Ćukasz Langa <lukasz@langa.pl>
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/os.rst | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/Doc/library/os.rst b/Doc/library/os.rst index 3bfefc6..8092397 100644 --- a/Doc/library/os.rst +++ b/Doc/library/os.rst @@ -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 @@ -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``. |