[New-bugs-announce] [issue40433] Equality operations between lists and arrays
Ahmed Amr
report at bugs.python.org
Tue Apr 28 22:52:17 EDT 2020
New submission from Ahmed Amr <ahmedamron at gmail.com>:
Hi, I was thinking if we could add equality between array and list to work out of the box on the supported datatypes by arrays.
Currently, comparing a list and an array with the same contents returns False.
Also, creating an array of floats from a listA, then turning that array into a listB, returns different contents between listA and listB.
It's somehow counter-intuitive for me as even if the underlying implementations are different between array and list, they can be viewed as an array data structure but with different restrictions/implementations, along with that, arrays compare to each other correctly, and lists compare to each other correctly.
based on that, switching some lists to arrays in a python codebase may break some equality conditions within that code between lists and arrays
----------
files: equality_between_arrays_and_lists.py
messages: 367615
nosy: Ahmed Amr
priority: normal
severity: normal
status: open
title: Equality operations between lists and arrays
type: enhancement
versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9
Added file: https://bugs.python.org/file49098/equality_between_arrays_and_lists.py
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40433>
_______________________________________
More information about the New-bugs-announce
mailing list