[Python-checkins] cpython (3.2): Issue #13255: wrong docstrings in array module.
florent.xicluna
python-checkins at python.org
Mon Oct 24 13:17:53 CEST 2011
http://hg.python.org/cpython/rev/451fa5782145
changeset: 73092:451fa5782145
branch: 3.2
parent: 73079:d34beaaf7060
user: Florent Xicluna <florent.xicluna at gmail.com>
date: Mon Oct 24 13:14:55 2011 +0200
summary:
Issue #13255: wrong docstrings in array module.
files:
Misc/NEWS | 2 ++
Modules/arraymodule.c | 8 ++++----
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -58,6 +58,8 @@
Library
-------
+- Issue #13255: wrong docstrings in array module.
+
- Issue #9168: now smtpd is able to bind privileged port.
- Issue #12529: fix cgi.parse_header issue on strings with double-quotes and
diff --git a/Modules/arraymodule.c b/Modules/arraymodule.c
--- a/Modules/arraymodule.c
+++ b/Modules/arraymodule.c
@@ -1484,7 +1484,7 @@
\n\
Extends this array with data from the unicode string ustr.\n\
The array must be a unicode type array; otherwise a ValueError\n\
-is raised. Use array.frombytes(ustr.decode(...)) to\n\
+is raised. Use array.frombytes(ustr.encode(...)) to\n\
append Unicode data to an array of some other type.");
@@ -1506,7 +1506,7 @@
\n\
Convert the array to a unicode string. The array must be\n\
a unicode type array; otherwise a ValueError is raised. Use\n\
-array.tostring().decode() to obtain a unicode string from\n\
+array.tobytes().decode() to obtain a unicode string from\n\
an array of some other type.");
@@ -2557,7 +2557,7 @@
extend() -- extend array by appending multiple elements from an iterable\n\
fromfile() -- read items from a file object\n\
fromlist() -- append items from the list\n\
-fromstring() -- append items from the string\n\
+frombytes() -- append items from the string\n\
index() -- return index of first occurrence of an object\n\
insert() -- insert a new item into the array at a provided position\n\
pop() -- remove and return item (default last)\n\
@@ -2565,7 +2565,7 @@
reverse() -- reverse the order of the items in the array\n\
tofile() -- write all items to a file object\n\
tolist() -- return the array converted to an ordinary list\n\
-tostring() -- return the array converted to a string\n\
+tobytes() -- return the array converted to a string\n\
\n\
Attributes:\n\
\n\
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list