[Python-checkins] cpython: Further documentation updates to be consistent with doc standards and comments

gregory.p.smith python-checkins at python.org
Sun Jun 5 08:06:09 CEST 2011


http://hg.python.org/cpython/rev/20d9926f5db5
changeset: 70640:20d9926f5db5
parent: 70289:6354b4ceba1d
user: Gregory P. Smith <greg at krypto.org>
date: Sun May 22 22:47:55 2011 -0700
summary:
 Further documentation updates to be consistent with doc standards and comments
Ezio Melotti pointed out.
files:
 Doc/library/socket.rst | 14 +++++++-------
 Misc/NEWS | 4 ++--
 Modules/socketmodule.c | 4 ++--
 3 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/Doc/library/socket.rst b/Doc/library/socket.rst
--- a/Doc/library/socket.rst
+++ b/Doc/library/socket.rst
@@ -538,9 +538,9 @@
 
 .. function:: if_nameindex()
 
- Returns a list of network interface information
- (index, name as a string) tuples.
- :exc:`socket.error` if the system call fails for any reason.
+ Return a list of network interface information
+ (index int, name string) tuples.
+ :exc:`socket.error` if the system call fails.
 
 Availability: Unix.
 
@@ -549,8 +549,8 @@
 
 .. function:: if_nametoindex(if_name)
 
- Returns a network interface index number corresponding to an
- interface name string.
+ Return a network interface index number corresponding to an
+ interface name.
 :exc:`socket.error` if no interface with the given name exists.
 
 Availability: Unix.
@@ -560,8 +560,8 @@
 
 .. function:: if_indextoname(if_index)
 
- Returns a network interface name string corresponding to a
- interface index.
+ Return a network interface name corresponding to a
+ interface index number.
 :exc:`socket.error` if no interface with the given index exists.
 
 Availability: Unix.
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -13,8 +13,8 @@
 - Issue #12060: Use sig_atomic_t type and volatile keyword in the signal
 module. Patch written by Charles-François Natali.
 
-- Added the if_nameindex, if_indextoname, if_nametoindex methods to
- the socket module as requested in issue #1746656.
+- Issue #1746656: Added the if_nameindex, if_indextoname, if_nametoindex
+ methods to the socket module.
 
 - Issue #12044: Fixed subprocess.Popen when used as a context manager to
 wait for the process to end when exiting the context to avoid unintentionally
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -137,8 +137,8 @@
 settimeout(None | float) -- set or clear the timeout\n\
 shutdown(how) -- shut down traffic in one or both directions\n\
 if_nameindex() -- return all network interface indices and names\n\
-if_nametoindex(name) -- returns the corresponding interface index\n\
-if_indextoname(index) -- returns the corresponding interface name\n\
+if_nametoindex(name) -- return the corresponding interface index\n\
+if_indextoname(index) -- return the corresponding interface name\n\
 \n\
 [*] not available on all platforms!");
 
-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /