-
-
Notifications
You must be signed in to change notification settings - Fork 30.9k
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
gh-83940: Remove os.env/b default type constraint in os docs #98113
Conversation
slateny
commented
Oct 9, 2022
•
edited by bedevere-bot
Loading
edited by bedevere-bot
- Issue: os.getenv documentation is misleading #83940
Doc/library/os.rst
Outdated
@@ -305,7 +305,7 @@ process and user. | |||
.. function:: getenv(key, default=None) | |||
|
|||
Return the value of the environment variable *key* if it exists, or | |||
*default* if it doesn't. *key*, *default* and the result are str. Note that | |||
*default* if it doesn't. *key* and the result are strings. Note that |
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.
The result isn't a string if default isn't one. I'd suggest "Return the value of the environment variable key as a string if it exists, or default if it doesn't. key is a string."
Thanks @slateny for the PR, and @JelleZijlstra for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10, 3.11. |
GH-98149 is a backport of this pull request to the 3.11 branch. |
GH-98150 is a backport of this pull request to the 3.10 branch. |