-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
gh-83940: Remove os.env/b default type constraint in os docs #98113
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
Conversation
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. |
…-98113) (cherry picked from commit 187e853) Co-authored-by: Stanley <[email protected]>
…-98113) (cherry picked from commit 187e853) Co-authored-by: Stanley <[email protected]>
(cherry picked from commit 187e853) Co-authored-by: Stanley <[email protected]>
(cherry picked from commit 187e853) Co-authored-by: Stanley <[email protected]>
(cherry picked from commit 187e853) Co-authored-by: Stanley <[email protected]>
Uh oh!
There was an error while loading. Please reload this page.