[Python-checkins] bpo-42620: Improve socket.getsockname doc string (GH-23742)

miss-islington webhook-mailer at python.org
Wed Dec 23 02:48:15 EST 2020

commit: 7fe7d83c26b02c8a65c8a9633cc4251f5cd97ebf
branch: 3.9
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: miss-islington <31488909+miss-islington at users.noreply.github.com>
date: 2020-12-22T23:48:04-08:00

bpo-42620: Improve socket.getsockname doc string (GH-23742)

Signed-off-by: Christian Heimes <christian at python.org>
(cherry picked from commit cf3565ca9a7ed0f7decd000e41fa3de400986e4d)

Co-authored-by: Christian Heimes <christian at python.org>

M Modules/socketmodule.c

diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
index 76ef606e10b1f..be75e681d45d9 100644
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -3407,8 +3407,9 @@ sock_getsockname(PySocketSockObject *s, PyObject *Py_UNUSED(ignored))
 "getsockname() -> address info\n\
-Return the address of the local endpoint.  For IP sockets, the address\n\
-info is a pair (hostaddr, port).");
+Return the address of the local endpoint. The format depends on the\n\
+address family. For IPv4 sockets, the address info is a pair\n\
+(hostaddr, port).");
 #ifdef HAVE_GETPEERNAME         /* Cray APP doesn't have this :-( */

More information about the Python-checkins mailing list