[Python-checkins] cpython (2.7): #16666: document default values for socket.getaddrinfo in the text to clarify
ezio.melotti
python-checkins at python.org
Tue Dec 25 13:46:29 CET 2012
http://hg.python.org/cpython/rev/1e5e7064e872
changeset: 81033:1e5e7064e872
branch: 2.7
user: Ezio Melotti <ezio.melotti at gmail.com>
date: Tue Dec 25 14:45:55 2012 +0200
summary:
#16666: document default values for socket.getaddrinfo in the text to clarify that it doesn't accept keyword args.
files:
Doc/library/socket.rst | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/Doc/library/socket.rst b/Doc/library/socket.rst
--- a/Doc/library/socket.rst
+++ b/Doc/library/socket.rst
@@ -230,7 +230,7 @@
*source_address* was added.
-.. function:: getaddrinfo(host, port, family=0, socktype=0, proto=0, flags=0)
+.. function:: getaddrinfo(host, port[, family[, socktype[, proto[, flags]]]])
Translate the *host*/*port* argument into a sequence of 5-tuples that contain
all the necessary arguments for creating a socket connected to that service.
@@ -240,12 +240,12 @@
and *port*, you can pass ``NULL`` to the underlying C API.
The *family*, *socktype* and *proto* arguments can be optionally specified
- in order to narrow the list of addresses returned. Passing zero as a
- value for each of these arguments selects the full range of results.
+ in order to narrow the list of addresses returned. By default, their value
+ is ``0``, meaning that the full range of results is selected.
The *flags* argument can be one or several of the ``AI_*`` constants,
- and will influence how results are computed and returned.
- For example, :const:`AI_NUMERICHOST` will disable domain name resolution
- and will raise an error if *host* is a domain name.
+ and will influence how results are computed and returned. Its default value
+ is ``0``. For example, :const:`AI_NUMERICHOST` will disable domain name
+ resolution and will raise an error if *host* is a domain name.
The function returns a list of 5-tuples with the following structure:
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list