Skip to content

Commit 7b3ea53

Browse files
sirosenpicnixz
andcommitted
Move placement of memoryview generic note
Previous placement was at the end of the main docstring, which is consistent with other types but places it after a section on various methods (which makes it read somewhat inconsistently). Moving it up helps resolve. Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
1 parent 4bb0cbf commit 7b3ea53

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Doc/library/stdtypes.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4592,6 +4592,8 @@ copying.
45924592
types such as :class:`bytes` and :class:`bytearray`, an element is a single
45934593
byte, but other types such as :class:`array.array` may have bigger elements.
45944594

4595+
memoryviews are :ref:`generic <generics>` over the type of their underlying data.
4596+
45954597
``len(view)`` is equal to the length of :meth:`~memoryview.tolist`, which
45964598
is the nested list representation of the view. If ``view.ndim = 1``,
45974599
this is equal to the number of elements in the view.
@@ -4669,8 +4671,6 @@ copying.
46694671
>>> hash(v[::-2]) == hash(b'abcefg'[::-2])
46704672
True
46714673

4672-
memoryviews are :ref:`generic <generics>` over the type of their underlying data.
4673-
46744674
.. versionchanged:: 3.3
46754675
One-dimensional memoryviews can now be sliced.
46764676
One-dimensional memoryviews with formats 'B', 'b' or 'c' are now :term:`hashable`.

0 commit comments

Comments
 (0)