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

Michael Lenzen m.lenzen at gmail.com
Sat Jul 18 21:07:39 CEST 2009


My full proposition includes 2 new classes, 2 new abstract base classes, 
modifying set and a new `collection` function to abstract away the new 
multitude of classes.

The collection function is my favorite part, you just pass it parameters 
about the collection you want (mutable, ordered and/or unique) and it 
returns the collection that fits without you ever having to figure it out.

-Michael Lenzen

>
> 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



More information about the Python-ideas mailing list