mirror of
https://github.com/python/cpython.git
synced 2025-09-03 15:31:08 +00:00
Issue #15724: Add versionchanged tags to the memoryview documentation.
This commit is contained in:
parent
a3f4a16607
commit
2a70535afd
1 changed files with 10 additions and 2 deletions
|
@ -2450,6 +2450,8 @@ copying.
|
||||||
``v == w`` for memoryview objects.
|
``v == w`` for memoryview objects.
|
||||||
|
|
||||||
.. versionchanged:: 3.3
|
.. versionchanged:: 3.3
|
||||||
|
Previous versions compared the raw memory disregarding the item format
|
||||||
|
and the logical array structure.
|
||||||
|
|
||||||
.. method:: tobytes()
|
.. method:: tobytes()
|
||||||
|
|
||||||
|
@ -2479,8 +2481,10 @@ copying.
|
||||||
>>> m.tolist()
|
>>> m.tolist()
|
||||||
[1.1, 2.2, 3.3]
|
[1.1, 2.2, 3.3]
|
||||||
|
|
||||||
:meth:`tolist` is currently restricted to single character native formats
|
.. versionchanged:: 3.3
|
||||||
in :mod:`struct` module syntax.
|
:meth:`tolist` now supports all single character native formats in
|
||||||
|
:mod:`struct` module syntax as well as multi-dimensional
|
||||||
|
representations.
|
||||||
|
|
||||||
.. method:: release()
|
.. method:: release()
|
||||||
|
|
||||||
|
@ -2664,6 +2668,10 @@ copying.
|
||||||
arbitrary format strings, but some methods (e.g. :meth:`tolist`) are
|
arbitrary format strings, but some methods (e.g. :meth:`tolist`) are
|
||||||
restricted to native single element formats.
|
restricted to native single element formats.
|
||||||
|
|
||||||
|
.. versionchanged:: 3.3
|
||||||
|
format ``'B'`` is now handled according to the struct module syntax.
|
||||||
|
This means that ``memoryview(b'abc')[0] == b'abc'[0] == 97``.
|
||||||
|
|
||||||
.. attribute:: itemsize
|
.. attribute:: itemsize
|
||||||
|
|
||||||
The size in bytes of each element of the memoryview::
|
The size in bytes of each element of the memoryview::
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue