]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-20408: Fix memoryview() signature in docs (GH-24431)
authorMariusz Felisiak <felisiak.mariusz@gmail.com>
Tue, 25 May 2021 14:24:30 +0000 (16:24 +0200)
committerGitHub <noreply@github.com>
Tue, 25 May 2021 14:24:30 +0000 (17:24 +0300)
Doc/library/functions.rst
Doc/library/stdtypes.rst

index 7d8a669f9e16d4bc82c21541572c8d89b1ef8d25..bc55d42fa86051c2d7be4a42ea63b799c9156c81 100644 (file)
@@ -1022,7 +1022,7 @@ are always available.  They are listed here in alphabetical order.
 
 
 .. _func-memoryview:
-.. class:: memoryview(obj)
+.. class:: memoryview(object)
    :noindex:
 
    Return a "memory view" object created from the given argument.  See
index c4e6b4d1186d0458359e25648b40a743c2686e0d..e34a888639c189b95b05db162c5a1d607ad1098f 100644 (file)
@@ -3632,17 +3632,16 @@ Memory Views
 of an object that supports the :ref:`buffer protocol <bufferobjects>` without
 copying.
 
-.. class:: memoryview(obj)
+.. class:: memoryview(object)
 
-   Create a :class:`memoryview` that references *obj*.  *obj* must support the
-   buffer protocol.  Built-in objects that support the buffer protocol include
-   :class:`bytes` and :class:`bytearray`.
+   Create a :class:`memoryview` that references *object*.  *object* must
+   support the buffer protocol.  Built-in objects that support the buffer
+   protocol include :class:`bytes` and :class:`bytearray`.
 
    A :class:`memoryview` has the notion of an *element*, which is the
-   atomic memory unit handled by the originating object *obj*.  For many
-   simple types such as :class:`bytes` and :class:`bytearray`, an element
-   is a single byte, but other types such as :class:`array.array` may have
-   bigger elements.
+   atomic memory unit handled by the originating *object*.  For many simple
+   types such as :class:`bytes` and :class:`bytearray`, an element is a single
+   byte, but other types such as :class:`array.array` may have bigger elements.
 
    ``len(view)`` is equal to the length of :class:`~memoryview.tolist`.
    If ``view.ndim = 0``, the length is 1. If ``view.ndim = 1``, the length