mirror of
https://github.com/python/cpython.git
synced 2025-10-27 16:57:08 +00:00
Close #15573: use value-based memoryview comparisons (patch by Stefan Krah)
This commit is contained in:
parent
5c0b1ca55e
commit
06e1ab0a6b
5 changed files with 778 additions and 132 deletions
|
|
@ -162,7 +162,6 @@ Features
|
|||
and the view is read-only. (Contributed by Antoine Pitrou in
|
||||
:issue:`13411`)
|
||||
|
||||
|
||||
* Arbitrary slicing of any 1-D arrays type is supported. For example, it
|
||||
is now possible to reverse a memoryview in O(1) by using a negative step.
|
||||
|
||||
|
|
@ -178,6 +177,12 @@ API changes
|
|||
now returns an integer (in accordance with the struct module syntax).
|
||||
For returning a bytes object the view must be cast to 'c' first.
|
||||
|
||||
* memoryview comparisons now use the logical structure of the operands
|
||||
and compare all array elements by value. All format strings in struct
|
||||
module syntax are supported. Views with unrecognised format strings
|
||||
are still permitted, but will always compare as unequal, regardless
|
||||
of view contents.
|
||||
|
||||
* For further changes see `Build and C API Changes`_ and `Porting C code`_ .
|
||||
|
||||
.. _pep-393:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue