Re: [Python-ideas] dict(default=int)

2017-03-14 Thread Markus Meskanen
Hi All, I find importing defaultdict from collections to be clunky I don't. And if this really turns out to be an issue, why not expose defaultdict to built-ins instead of messing with dict class? ___ Python-ideas mailing list [email protected] h

[Python-ideas] Additions to collections.Counter and a Counter derived class

2017-03-14 Thread Marco Cognetta
Hi all, I have been using the Counter class recently and came across several things that I was hoping to get feedback on. (This is my first time mailing this list, so any advice is greatly appreciated) 1) Addition of a Counter.least_common method: This would add a method to Counter that is basic

Re: [Python-ideas] dict(default=int)

2017-03-14 Thread Wes Turner
class OrderedDefaultDict, __missing__(), kwargs.pop('default_factory') - Src: https://gist.github.com/westurner/be22dba8110be099a35e#file-ordereddefaultdict-py >From https://groups.google.com/d/msg/python-ideas/9bpR8-bNC6o/tQ92g7wLGAAJ : On Fri, Oct 16, 2015 at 9:08 PM, Andrew Barnert via Python

Re: [Python-ideas] Additions to collections.Counter and a Counter derived class

2017-03-14 Thread David Mertz
On Tue, Mar 14, 2017 at 2:38 AM, Marco Cognetta wrote: > 1) Addition of a Counter.least_common method: > This was addressed in https://bugs.python.org/issue16994, but it was > never resolved and is still open (since Jan. 2013). This is a small > change, but I think that it is useful to include in