On Fri, Jun 29, 2018 at 11:25 PM, Guido van Rossum <gu...@python.org> wrote:
> Hm, this actually feels heavier to me. But then again I never liked or > understood the need for Counter -- > actually, me neither -- and partly because it's too lightweight -- that is, it's still a regular dict, and you pretty much have to know that to use it. That it, it provides a nice counting constructor, but after that, it's just a key:integer dict :-) But in this case, I think there is more of an argument for a custom class -- if al it were was a dict with a custom constructor (and update) method, then yeah, better to have a function. But there is more tha could be built on top of a grouping class, one that happened to be a dict under the hod, but really s its own thing, with a handful of interfaces and methods that are specific to it. More detail elsewhere in the discussion. -CHB -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception chris.bar...@noaa.gov
_______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/