Skip to content

Commit c45fb25

Browse files
committed
Issue #13255: wrong docstrings in array module.
1 parent 023611f commit c45fb25

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

Misc/NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ Core and Builtins
5858
Library
5959
-------
6060

61+
- Issue #13255: wrong docstrings in array module.
62+
6163
- Issue #9168: now smtpd is able to bind privileged port.
6264

6365
- Issue #12529: fix cgi.parse_header issue on strings with double-quotes and

Modules/arraymodule.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1484,7 +1484,7 @@ PyDoc_STRVAR(fromunicode_doc,
14841484
\n\
14851485
Extends this array with data from the unicode string ustr.\n\
14861486
The array must be a unicode type array; otherwise a ValueError\n\
1487-
is raised. Use array.frombytes(ustr.decode(...)) to\n\
1487+
is raised. Use array.frombytes(ustr.encode(...)) to\n\
14881488
append Unicode data to an array of some other type.");
14891489

14901490

@@ -1506,7 +1506,7 @@ PyDoc_STRVAR(tounicode_doc,
15061506
\n\
15071507
Convert the array to a unicode string. The array must be\n\
15081508
a unicode type array; otherwise a ValueError is raised. Use\n\
1509-
array.tostring().decode() to obtain a unicode string from\n\
1509+
array.tobytes().decode() to obtain a unicode string from\n\
15101510
an array of some other type.");
15111511

15121512

@@ -2557,15 +2557,15 @@ count() -- return number of occurrences of an object\n\
25572557
extend() -- extend array by appending multiple elements from an iterable\n\
25582558
fromfile() -- read items from a file object\n\
25592559
fromlist() -- append items from the list\n\
2560-
fromstring() -- append items from the string\n\
2560+
frombytes() -- append items from the string\n\
25612561
index() -- return index of first occurrence of an object\n\
25622562
insert() -- insert a new item into the array at a provided position\n\
25632563
pop() -- remove and return item (default last)\n\
25642564
remove() -- remove first occurrence of an object\n\
25652565
reverse() -- reverse the order of the items in the array\n\
25662566
tofile() -- write all items to a file object\n\
25672567
tolist() -- return the array converted to an ordinary list\n\
2568-
tostring() -- return the array converted to a string\n\
2568+
tobytes() -- return the array converted to a string\n\
25692569
\n\
25702570
Attributes:\n\
25712571
\n\

0 commit comments

Comments
 (0)