18 Dec
2015
18 Dec
'15
4:03 p.m.
On 18.12.2015 20:58, Andrew Barnert via Python-ideas wrote:
If you're thinking we could define what multisets should do, despite not having a standard multiset type or an ABC for them, and apply that to values views, the next question is how to do that in better than quadratic time for non-hashable values. (And you can't assume ordering here, either.) Would having a values view hang for 30 seconds and then come back with the answer you intuitively wanted instead of giving the wrong answer in 20 millis be an improvement? (Either way, you're going to learn the same lesson: don't compare values views. I'd rather learn that in 20 millis.)
I like the multiset/bag idea. Python calls them Counter, right? Best, Sven