This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Ahmed Amr
Recipients Ahmed Amr
Date 2020-04-29.02:52:17
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1588128737.73.0.376280736154.issue40433@roundup.psfhosted.org>
In-reply-to
Content
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
History
Date User Action Args
2020-04-29 02:52:17Ahmed Amrsetrecipients: + Ahmed Amr
2020-04-29 02:52:17Ahmed Amrsetmessageid: <1588128737.73.0.376280736154.issue40433@roundup.psfhosted.org>
2020-04-29 02:52:17Ahmed Amrlinkissue40433 messages
2020-04-29 02:52:17Ahmed Amrcreate