Ram Rachum added the comment:

Ethan, I don't understand what the problem is. I also don't understand your 
side note question "how does partial-ordering work for sets?" I'm not sure what 
you're asking. 

>> That is, one counter will be considered smaller-or-equal to another if for 
>> any
>> item in the first counter, the second counter has an equal or bigger amount 
>> of
>> that item.

> According to your definition, my example should have returned True, which is 
> clearly nonsensical.

In your example the first counter had `b` twice, while the second counter had 
it only once. So the result is `False`. This comes pretty directly from my 
definition, I'm not sure where the confusion is. 

Regarding your new example: Since `Counter` works like a `defaultdict`, the 
second counter has a zero quantity of `b`. So the answer is again `False`.

----------

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

Reply via email to