[Python-checkins] cpython: Issue #15814: Documentation: disallow hashing of multi-dimensional memoryviews.

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


http://hg.python.org/cpython/rev/71f4d80400f2
changeset:   78916:71f4d80400f2
user:        Stefan Krah <skrah at bytereef.org>
date:        Sun Sep 02 14:50:56 2012 +0200
summary:
  Issue #15814: Documentation: disallow hashing of multi-dimensional memoryviews.

files:
  Doc/library/stdtypes.rst |  14 ++++++++------
  1 files changed, 8 insertions(+), 6 deletions(-)


diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst
--- a/Doc/library/stdtypes.rst
+++ b/Doc/library/stdtypes.rst
@@ -2376,8 +2376,9 @@
       >>> data
       bytearray(b'z1spam')
 
-   Memoryviews of hashable (read-only) types with formats 'B', 'b' or 'c'
-   are also hashable. The hash is defined as ``hash(m) == hash(m.tobytes())``::
+   One-dimensional memoryviews of hashable (read-only) types with formats
+   'B', 'b' or 'c' are also hashable. The hash is defined as
+   ``hash(m) == hash(m.tobytes())``::
 
       >>> v = memoryview(b'abcefg')
       >>> hash(v) == hash(b'abcefg')
@@ -2388,12 +2389,13 @@
       True
 
    .. versionchanged:: 3.3
-      Memoryview objects with formats 'B', 'b' or 'c' are now hashable.
+      One-dimensional memoryviews with formats 'B', 'b' or 'c' are now hashable.
 
    .. note::
-      Hashing of memoryviews with formats other than 'B', 'b' or 'c' is
-      possible in version 3.3.0, but will raise an error in 3.3.1 in order
-      to be compatible with the new memoryview equality definition.
+      Hashing of memoryviews with formats other than 'B', 'b' or 'c' as well
+      as hashing of multi-dimensional memoryviews is possible in version 3.3.0,
+      but will raise an error in 3.3.1 in order to be compatible with the new
+      memoryview equality definition.
 
    :class:`memoryview` has several methods:
 

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


More information about the Python-checkins mailing list