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 gregory.p.smith
Recipients eric.araujo, ezio.melotti, flox, gregory.p.smith, michael.foord
Date 2010-03-09.01:46:44
SpamBayes Score 6.411867e-05
Marked as misclassified No
Message-id <1268099206.6.0.414752032989.issue7832@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2010-03-09 01:46:46gregory.p.smithsetrecipients: + gregory.p.smith, ezio.melotti, eric.araujo, michael.foord, flox
2010-03-09 01:46:46gregory.p.smithsetmessageid: <1268099206.6.0.414752032989.issue7832@psf.upfronthosting.co.za>
2010-03-09 01:46:44gregory.p.smithlinkissue7832 messages
2010-03-09 01:46:44gregory.p.smithcreate