(original) (raw)
changeset: 71863:dfe6f0a603d2 branch: 2.7 parent: 71845:70ace8ffa4ac user: Ezio Melotti ezio.melotti@gmail.com date: Sun Aug 14 08:27:36 2011 +0300 files: Doc/ACKS.txt Doc/library/socket.rst Modules/socketmodule.c description: #12725: fix working. Patch by Ben Hayden. diff -r 70ace8ffa4ac -r dfe6f0a603d2 Doc/ACKS.txt --- a/Doc/ACKS.txt Sat Aug 13 00:39:29 2011 +0200 +++ b/Doc/ACKS.txt Sun Aug 14 08:27:36 2011 +0300 @@ -77,6 +77,7 @@ * Travis B. Hartwell * Tim Hatch * Janko Hauser + * Ben Hayden * Thomas Heller * Bernhard Herzog * Magnus L. Hetland diff -r 70ace8ffa4ac -r dfe6f0a603d2 Doc/library/socket.rst --- a/Doc/library/socket.rst Sat Aug 13 00:39:29 2011 +0200 +++ b/Doc/library/socket.rst Sun Aug 14 08:27:36 2011 +0300 @@ -488,7 +488,7 @@ .. function:: getdefaulttimeout() - Return the default timeout in floating seconds for new socket objects. A value + Return the default timeout in seconds (float) for new socket objects. A value of ``None`` indicates that new socket objects have no timeout. When the socket module is first imported, the default is ``None``. @@ -497,7 +497,7 @@ .. function:: setdefaulttimeout(timeout) - Set the default timeout in floating seconds for new socket objects. A value of + Set the default timeout in seconds (float) for new socket objects. A value of ``None`` indicates that new socket objects have no timeout. When the socket module is first imported, the default is ``None``. @@ -766,7 +766,7 @@ .. method:: socket.gettimeout() - Return the timeout in floating seconds associated with socket operations, or + Return the timeout in seconds (float) associated with socket operations, or ``None`` if no timeout is set. This reflects the last call to :meth:`setblocking` or :meth:`settimeout`. diff -r 70ace8ffa4ac -r dfe6f0a603d2 Modules/socketmodule.c --- a/Modules/socketmodule.c Sat Aug 13 00:39:29 2011 +0200 +++ b/Modules/socketmodule.c Sun Aug 14 08:27:36 2011 +0300 @@ -1784,7 +1784,7 @@ PyDoc_STRVAR(gettimeout_doc, "gettimeout() -> timeout\n\ \n\ -Returns the timeout in floating seconds associated with socket \n\ +Returns the timeout in seconds (float) associated with socket \n\ operations. A timeout of None indicates that timeouts on socket \n\ operations are disabled."); @@ -4252,7 +4252,7 @@ PyDoc_STRVAR(getdefaulttimeout_doc, "getdefaulttimeout() -> timeout\n\ \n\ -Returns the default timeout in floating seconds for new socket objects.\n\ +Returns the default timeout in seconds (float) for new socket objects.\n\ A value of None indicates that new socket objects have no timeout.\n\ When the socket module is first imported, the default is None."); @@ -4282,7 +4282,7 @@ PyDoc_STRVAR(setdefaulttimeout_doc, "setdefaulttimeout(timeout)\n\ \n\ -Set the default timeout in floating seconds for new socket objects.\n\ +Set the default timeout in seconds (float) for new socket objects.\n\ A value of None indicates that new socket objects have no timeout.\n\ When the socket module is first imported, the default is None."); /ezio.melotti@gmail.com