[Python-checkins] cpython: Issue #15724: Add versionchanged tags to the memoryview documentation.

georg.brandl python-checkins at python.org
Sun Sep 9 11:19:13 CEST 2012


http://hg.python.org/cpython/rev/144d649764cf
changeset:   78907:144d649764cf
user:        Stefan Krah <skrah at bytereef.org>
date:        Thu Aug 30 12:09:09 2012 +0200
summary:
  Issue #15724: Add versionchanged tags to the memoryview documentation.

files:
  Doc/library/stdtypes.rst |  12 ++++++++++--
  1 files changed, 10 insertions(+), 2 deletions(-)


diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst
--- a/Doc/library/stdtypes.rst
+++ b/Doc/library/stdtypes.rst
@@ -2450,6 +2450,8 @@
       ``v == w`` for memoryview objects.
 
       .. versionchanged:: 3.3
+         Previous versions compared the raw memory disregarding the item format
+         and the logical array structure.
 
    .. method:: tobytes()
 
@@ -2479,8 +2481,10 @@
          >>> m.tolist()
          [1.1, 2.2, 3.3]
 
-      :meth:`tolist` is currently restricted to single character native formats
-      in :mod:`struct` module syntax.
+      .. versionchanged:: 3.3
+         :meth:`tolist` now supports all single character native formats in
+         :mod:`struct` module syntax as well as multi-dimensional
+         representations.
 
    .. method:: release()
 
@@ -2664,6 +2668,10 @@
       arbitrary format strings, but some methods (e.g. :meth:`tolist`) are
       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
 
       The size in bytes of each element of the memoryview::

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list