Gregory P. Smith <g...@krypto.org> added the comment:

Looking through the thousands of uses of assertSameElements in our internal 
code base at work I see many uses of it that are likely not hashable items in 
the sequences being compared.

The largest use of course is with lists and tuples of hashables where another 
assert method may have even made more sense, but that is not the only use.

As documented in Python 3.1 I think the behavior of assertSameElements is 
accurate and makes sense.  We should add an extra note to the documentation to 
explicitly mention that it does not care how many of a given element occur in 
either sequence.  [0, 1, 1] and [0, 0, 1] do in fact have the same elements.

If you want a different behavior please add that as a feature.  As such, Ezio's 
option (b) and (d) are the only ones I'm in favor of.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue7832>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to