-
-
Notifications
You must be signed in to change notification settings - Fork 32k
bpo-45600: Enhanced / clarified the docs for os.environ and os.environb #29204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -170,9 +170,9 @@ 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 of key and value 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 +209,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 of key and value | ||
byte strings representing the process environment. :data:`environ` and | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Similarly, here you can say "where both keys and values are :class: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I like "keys and values are strings", updated. |
||
:data:`environb` are synchronized (modify :data:`environb` updates | ||
:data:`environ`, and vice versa). | ||
|
||
:data:`environb` is only available if :data:`supports_bytes_environ` is | ||
``True``. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't valid English. You want to say "of string keys and values", or less tersely "where keys and values are strings" which I think reads better.