Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.4k
bpo-40635: Fix getfqdn() docstring and docs#27971
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Uh oh!
There was an error while loading.Please reload this page.
Fidget-Spinner left a comment
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.
Thanks Andrei, this LGTM. But let's hear from a socket/networking expert first (and whether they want a news item).
Doc/library/socket.rst Outdated
| host, if available. The first name which includes a period is selected.If FQDN is not | ||
| available and *name* is empty or is``'0.0.0.0'``,hostnamefrom:func:`gethostname` is | ||
| returned. Otherwise, *name*is returned unchanged. |
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.
Please don't exceed 79 characters per line.
| host, if available. The first name which includes a period is selected. If FQDN is not | |
| available and *name* is empty or is ``'0.0.0.0'``, hostname from:func:`gethostname` is | |
| returned. Otherwise, *name* is returned unchanged. | |
| host, if available. The first name which includes a period is selected. In | |
| case no fully qualified domain name is available and *name* was provided, | |
| it is returned unchanged. If *name* was empty or equal to ``'0.0.0.0'``, | |
| the hostname as returned by:func:`gethostname` is returned. |
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.
'as returned ... is returned' reads a bit awkward I think, is it okay if I use the same wording as in your suggestion for the docstring? ; which is:
[...] hostname from gethostname() is returned.
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.
Sure, agreed. I just used what was originally in the doc but you're right that the docstring version is an improvement.
Uh oh!
There was an error while loading.Please reload this page.
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
miss-islington commentedAug 26, 2021
Co-authored-by: Łukasz Langa <lukasz@langa.pl>(cherry picked from commitfdcb675)Co-authored-by: andrei kulakov <andrei.avk@gmail.com>
bedevere-bot commentedAug 26, 2021
GH-27977 is a backport of this pull request to the3.10 branch. |
bedevere-bot commentedAug 26, 2021
GH-27978 is a backport of this pull request to the3.9 branch. |
Co-authored-by: Łukasz Langa <lukasz@langa.pl>(cherry picked from commitfdcb675)Co-authored-by: andrei kulakov <andrei.avk@gmail.com>
akulakov commentedAug 26, 2021
Thanks@ambv and@Fidget-Spinner for reviewing :) |
Uh oh!
There was an error while loading.Please reload this page.
https://bugs.python.org/issue40635