News for hackers. Stuff that matters.
Re:Bounter: A Python counter that uses limited memory regard... by gipp on Saturday October 21, 2017 @08:26AM (#15521644)
The tradeoffs themselves I think are fine. If I have an issue it's that the three different use cases outlined have _completely_ different tradeoffs using completely different data structures, but are presented behind one API differing only in boolean flags.

I don't know about you, but a boolean flag completely changing the behavior of a collection definitely violates least surprise to me. They should be different classes with descriptive names, IMO.

Re:Bounter: A Python counter that uses limited memory regard... by Radim on Saturday October 21, 2017 @08:36AM (#15521662)
Hi there, thanks for the constructive comments!

They actually are completely different classes internally. The ‘bounter’ function is just a convenience wrapper (factory). For power users, the internal classes offer more control and parameters.

If you have any suggestions / concerns, please raise an issue on github. It’s a new library, we’re looking for feedback!