summaryrefslogtreecommitdiffstats
path: root/Objects/bytearrayobject.c
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2011-12-17 22:18:43 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2011-12-17 22:18:43 (GMT)
commite010fc029daa0a445c9d7ab78d4cd4f12b42a991 (patch)
treecf1495de94655ba1fa018e6d0bdd57e24a50d529 /Objects/bytearrayobject.c
parent25ec056cc2bab9d0dd6f7665911f246e491744c5 (diff)
parentbb2e9c477d1cfb24f20ff979584af8fdb7b67a57 (diff)
downloadcpython-e010fc029daa0a445c9d7ab78d4cd4f12b42a991.zip
cpython-e010fc029daa0a445c9d7ab78d4cd4f12b42a991.tar.gz
cpython-e010fc029daa0a445c9d7ab78d4cd4f12b42a991.tar.bz2
Issue #11231: Fix bytes and bytearray docstrings
Patch written by Brice Berna.
Diffstat (limited to 'Objects/bytearrayobject.c')
-rw-r--r--Objects/bytearrayobject.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/Objects/bytearrayobject.c b/Objects/bytearrayobject.c
index cfb8f88..2571858 100644
--- a/Objects/bytearrayobject.c
+++ b/Objects/bytearrayobject.c
@@ -2890,18 +2890,16 @@ bytearray_methods[] = {
PyDoc_STRVAR(bytearray_doc,
"bytearray(iterable_of_ints) -> bytearray\n\
bytearray(string, encoding[, errors]) -> bytearray\n\
-bytearray(bytes_or_bytearray) -> mutable copy of bytes_or_bytearray\n\
-bytearray(memory_view) -> bytearray\n\
+bytearray(bytes_or_buffer) -> mutable copy of bytes_or_buffer\n\
+bytearray(int) -> bytes array of size given by the parameter initialized with null bytes\n\
+bytearray() -> empty bytes array\n\
\n\
Construct an mutable bytearray object from:\n\
- an iterable yielding integers in range(256)\n\
- a text string encoded using the specified encoding\n\
- - a bytes or a bytearray object\n\
+ - a bytes or a buffer object\n\
- any object implementing the buffer API.\n\
-\n\
-bytearray(int) -> bytearray\n\
-\n\
-Construct a zero-initialized bytearray of the given length.");
+ - an integer");
static PyObject *bytearray_iter(PyObject *seq);