Commits

Stefan Krah committed c1176f7

Drop m1, m2 variable names for consistency.

Comments (0)

Files changed (1)

Doc/library/stdtypes.rst

    Hashing of multi-dimensional objects is supported::
 
       >>> buf = bytes(list(range(12)))
-      >>> m1 = memoryview(buf)
-      >>> m2 = m1.cast('B', shape=[2,2,3])
-      >>> m1.tolist()
+      >>> x = memoryview(buf)
+      >>> y = x.cast('B', shape=[2,2,3])
+      >>> x.tolist()
       [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
-      >>> m2.tolist()
+      >>> y.tolist()
       [[[0, 1, 2], [3, 4, 5]], [[6, 7, 8], [9, 10, 11]]]
-      >>> hash(m1) == hash(m2) == hash(m2.tobytes())
+      >>> hash(x) == hash(y) == hash(y.tobytes())
       True
 
    .. versionchanged:: 3.3
          >>> class BEPoint(BigEndianStructure):
          ...     _fields_ = [("x", c_long), ("y", c_long)]
          ... 
-         >>> x = BEPoint(100, 200)
-         >>> m1 = memoryview(x)
-         >>> m2 = memoryview(x)
-         >>> m1 == m2
+         >>> point = BEPoint(100, 200)
+         >>> a = memoryview(point)
+         >>> b = memoryview(point)
+         >>> a == b
          False
-         >>> m1.tolist()
+         >>> a.tolist()
          Traceback (most recent call last):
            File "<stdin>", line 1, in <module>
          NotImplementedError: memoryview: unsupported format T{>l:x:>l:y:}