@@ -214,7 +214,7 @@ The module :mod:`socket` exports the following constants and functions:
214214 *source_address * was added.
215215
216216
217- .. function :: getaddrinfo(host, port, family=0, socktype =0, proto=0, flags=0)
217+ .. function :: getaddrinfo(host, port, family=0, type =0, proto=0, flags=0)
218218
219219 Translate the *host */*port * argument into a sequence of 5-tuples that contain
220220 all the necessary arguments for creating a socket connected to that service.
@@ -223,7 +223,7 @@ The module :mod:`socket` exports the following constants and functions:
223223 port number or ``None ``. By passing ``None `` as the value of *host *
224224 and *port *, you can pass ``NULL `` to the underlying C API.
225225
226- The *family *, *socktype * and *proto * arguments can be optionally specified
226+ The *family *, *type * and *proto * arguments can be optionally specified
227227 in order to narrow the list of addresses returned. Passing zero as a
228228 value for each of these arguments selects the full range of results.
229229 The *flags * argument can be one or several of the ``AI_* `` constants,
@@ -233,9 +233,9 @@ The module :mod:`socket` exports the following constants and functions:
233233
234234 The function returns a list of 5-tuples with the following structure:
235235
236- ``(family, socktype , proto, canonname, sockaddr) ``
236+ ``(family, type , proto, canonname, sockaddr) ``
237237
238- In these tuples, *family *, *socktype *, *proto * are all integers and are
238+ In these tuples, *family *, *type *, *proto * are all integers and are
239239 meant to be passed to the :func: `socket ` function. *canonname * will be
240240 a string representing the canonical name of the *host * if
241241 :const: `AI_CANONNAME ` is part of the *flags * argument; else *canonname *
@@ -249,10 +249,13 @@ The module :mod:`socket` exports the following constants and functions:
249249 connection to ``www.python.org `` on port 80 (results may differ on your
250250 system if IPv6 isn't enabled)::
251251
252- >>> socket.getaddrinfo("www.python.org", 80, 0, 0, socket.SOL_TCP)
252+ >>> socket.getaddrinfo("www.python.org", 80, proto= socket.SOL_TCP)
253253 [(2, 1, 6, '', ('82.94.164.162', 80)),
254254 (10, 1, 6, '', ('2001:888:2000:d::a2', 80, 0, 0))]
255255
256+ .. versionchanged :: 3.2
257+ parameters can now be passed as single keyword arguments.
258+
256259.. function :: getfqdn([name])
257260
258261 Return a fully qualified domain name for *name *. If *name * is omitted or empty,
0 commit comments