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 steven.daprano
Recipients cool-RR, eric.smith, ethan.furman, josh.r, pitrou, r.david.murray, rhettinger, serhiy.storchaka, steven.daprano
Date 2014-10-01.16:59:26
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
In-reply-to <>
Ethan said:

> If it is so specialized as to only be needed in complex combinatorial 
> calculations, does it belong in the general-purpose part of the 
> language?

It's a multi-set, a general purpose and fairly fundamental data type.

And later:

> Curiousity question:  What happens if you try to sort a list of 
> partially ordered Counters?

The same thing that happens when you sort a list of any partially 
ordered objects, such as sets:

py> sorted([{1, 2, 3, 4}, {2, 4}, {1, 3}, {2, 3, 4}, {1, 2, 3}])
[{2, 4}, {1, 3}, {2, 3, 4}, {1, 2, 3}, {1, 2, 3, 4}]

You get some order, but since sorting assumes a total order, not just 
partial order, the result isn't really meaningful, and will very likely 
depend on the initial order of the items. If that worries you, then 
don't sort items that implement only a partial order.
Date User Action Args
2014-10-01 16:59:27steven.dapranosetrecipients: + steven.daprano, rhettinger, pitrou, eric.smith, r.david.murray, cool-RR, ethan.furman, serhiy.storchaka, josh.r
2014-10-01 16:59:27steven.dapranolinkissue22515 messages
2014-10-01 16:59:26steven.dapranocreate