diff options
| author | andrei kulakov <andrei.avk@gmail.com> | 2021-08-26 14:40:28 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-08-26 20:40:28 +0200 |
| commit | fdcb675eed47b1f6054fae381af4388b16a6fff4 (patch) | |
| tree | 20fd412e199603136ca3be6c79c1afce67ec3fb5 /Lib/socket.py | |
| parent | f9cd40f5e242d3c64cc20a5064500f5fe864f91f (diff) | |
| download | cpython-git-fdcb675eed47b1f6054fae381af4388b16a6fff4.tar.gz | |
bpo-40635: Fix getfqdn() docstring and docs (GH-27971)
Co-authored-by: Ćukasz Langa <lukasz@langa.pl>
Diffstat (limited to 'Lib/socket.py')
| -rwxr-xr-x | Lib/socket.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/socket.py b/Lib/socket.py index a64ae400ce..ef82c496cb 100755 --- a/Lib/socket.py +++ b/Lib/socket.py @@ -782,8 +782,9 @@ def getfqdn(name=''): An empty argument is interpreted as meaning the local host. First the hostname returned by gethostbyaddr() is checked, then - possibly existing aliases. In case no FQDN is available, hostname - from gethostname() is returned. + possibly existing aliases. In case no FQDN is available and `name` + was given, it is returned unchanged. If `name` was empty or '0.0.0.0', + hostname from gethostname() is returned. """ name = name.strip() if not name or name == '0.0.0.0': |
