On Tue, Dec 22, 2020 at 11:44 PM Alan G. Isaac <alan.isaac@gmail.com> wrote:
My question is not about work arounds.
It is about whether the current definition of a sequence
(in collections.abc) should govern `assertSequenceEqual`.

Why do you think a NumPy array is a sequence?


>>> a
array([[1, 2],
       [3, 4]])
>>> b
[1, 2]
>>> len(a) = len(b)

 Ok, I suppose if you then loop through indices, you indeed get different things.  But N-dimensional arrays aren't "indexed by an integer" except in the sense of an edge case.  I've always read the Glossary as more narrowly "element access using ONLY integer indices."

Moreover, if you propose to ignore `==` comparison and always loop, will you do so recursively?  What about:

assertSequenceEqual(a, [[1,2], [3,4]])

The dead increasingly dominate and strangle both the living and the
not-yet born.  Vampiric capital and undead corporate persons abuse
the lives and control the thoughts of homo faber. Ideas, once born,
become abortifacients against new conceptions.