Re: Real-world use of Counter

2014-11-06 Thread Ian Kelly
On Nov 6, 2014 10:51 AM, "Ian Kelly" wrote: > > On Nov 6, 2014 1:06 AM, "Rustom Mody" wrote: > > Calling a bag as counter is inappropriate for an analogous reason > > to why calling a dictionary as a 'hash' is inappropriate -- > > it confuses an implementation detail for fundamental semantics. >

Re: Real-world use of Counter

2014-11-06 Thread Ian Kelly
On Nov 6, 2014 1:06 AM, "Rustom Mody" wrote: > In studying (somewhat theoretically) the general world of > collection data structures we see > - sets -- neither order nor repetition > - bags -- no order, repetition significant > - lists -- both order and repetition > > Sometimes 'bag' is called

Re: Real-world use of Counter

2014-11-05 Thread Rustom Mody
On Wednesday, November 5, 2014 9:57:08 PM UTC+5:30, Ethan Furman wrote: > In order to avoid unnecessary code churn (the fix itself is quite simple), > the maintainer of the collections module > wants to know if anybody has actually been affected by these inconsistencies, > and if so, whether it

Re: Real-world use of Counter

2014-11-05 Thread Peter Otten
Ethan Furman wrote: > I'm looking for real-world uses of collections.Counter, specifically to > see if anyone has been surprised by, or had to spend extra-time debugging, > issues with the in-place operators. > > Background: > > Most Python data types will cause a TypeError to be raised if unusa

Real-world use of Counter

2014-11-05 Thread Ethan Furman
I'm looking for real-world uses of collections.Counter, specifically to see if anyone has been surprised by, or had to spend extra-time debugging, issues with the in-place operators. Background: Most Python data types will cause a TypeError to be raised if unusable types are passed in: --> {'