Comparisions for collections.Counters
Hello everyone, According to the [doc][1], `collections.Counter` convenience intersection and union functions are meant to help it represent multisets. However, it currently lacks comparisons, which would make sense and seems straightforward to implement. Am I missing something here or should I send a PR ASAP ? :-) Cheers, E [1]: https://docs.python.org/3/library/collections.html#collections.Counter
On Wed, Sep 5, 2018 at 3:13 AM Evpok Padding
According to the [doc][1], `collections.Counter` convenience intersection and union functions are meant to help it represent multisets. However, it currently lacks comparisons, which would make sense and seems straightforward to implement.
x = Counter(a=1, b=2) y = Counter(a=2, b=1) x > y ?
05.09.18 13:10, Evpok Padding пише:
According to the [doc][1], `collections.Counter` convenience intersection and union functions are meant to help it represent multisets. However, it currently lacks comparisons, which would make sense and seems straightforward to implement. Am I missing something here or should I send a PR ASAP ? :-)
There is a closed issue for this: https://bugs.python.org/issue22515.
On Wed, 5 Sep 2018 at 18:28, Serhiy Storchaka
There is a closed issue for this: https://bugs.python.org/issue22515.
Oh, thanks, I had missed that. I guess I can live with it, although I agree with [the last comment][1] that this decision does not make a lot of sense. But hey, who am I to second-guess Guido anr Raymond H. Cheers, E [1]: https://bugs.python.org/issue22515#msg253251
participants (3)
-
Evpok Padding
-
Michael Selik
-
Serhiy Storchaka