[Python-ideas] Proposal for extending the collections module - bags / multisets, ordered sets / unique lists

Chris Rebert pyideas at rebertia.com
Sat Jul 18 20:56:30 CEST 2009


> On 07/18/2009 01:03 PM, Mart Sõmermaa wrote:
>>
>> I drove a similar discussion a few months ago (April or May), nobody
>> was opposing then, so I'd say go ahead and file a feature request.
>>
>> Of course, I'm personally strongly +1, especially for ordered set/unique
>> list.
>>
>> Various implementations:
>>
>> http://code.activestate.com/recipes/576694/
>> http://www.peterbe.com/plog/uniqifiers-benchmark/
>>
>> A list with no duplicate values is a common problem judging on the
>> following:
>>
>> http://www.google.com/codesearch?q=lang%3Apython+list+unique
>> http://www.google.com/codesearch?q=lang%3Apython+list+duplicates
>> http://code.activestate.com/recipes/52560/
>> http://www.google.com/search?q=python+unique+list

On Sat, Jul 18, 2009 at 11:35 AM, Michael Lenzen<m.lenzen at gmail.com> wrote:
> I was thinking of submitting a PEP, but I wanted to get feedback first and
> finish up my reference implementation.

A PEP is probably not be necessary just to add a class to the std lib.
Counter was added without a PEP after all. You would need to convince
the committers though.

Cheers,
Chris
-- 
http://blog.rebertia.com



More information about the Python-ideas mailing list