Message227848
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`. |
|
Date |
User |
Action |
Args |
2014-09-29 22:30:54 | cool-RR | set | recipients:
+ cool-RR, steven.daprano, r.david.murray, ethan.furman, serhiy.storchaka, josh.r |
2014-09-29 22:30:54 | cool-RR | set | messageid: <1412029854.14.0.881220738533.issue22515@psf.upfronthosting.co.za> |
2014-09-29 22:30:54 | cool-RR | link | issue22515 messages |
2014-09-29 22:30:53 | cool-RR | create | |
|