[issue10242] unittest's assertItemsEqual() method makes too many assumptions about its input

Raymond Hettinger report at bugs.python.org
Thu Nov 4 03:41:57 CET 2010

Raymond Hettinger <rhettinger at users.sourceforge.net> added the comment:

One nuance, it may be better to implement as:

     a_cnt = collections.Counter(iter(a))
     b_cnt = collections.Counter(iter(b))

That will bypass the special handling the Counter constructor has if the  argument is a Mapping.


Python tracker <report at bugs.python.org>

More information about the Python-bugs-list mailing list