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

Michael Lenzen m.lenzen at gmail.com
Sat Jul 18 22:00:19 CEST 2009


On 07/18/2009 02:28 PM, Paul Moore wrote:
> 2009/7/18 Chris Rebert<pyideas at rebertia.com>:
>> 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.
>
> For something like this, you could release your code as a separate
> module. Then let it get some popular support before asking for it to
> be promoted to the standard library. (Of course the proposed set
> changes might not be possible this way, but they are the most likely
> aspect to get rejected, because of backward compatibility concerns, in
> any case).
>
> Paul.

My module (collections_) is a drop in replacement for collections, it 
imports everything from there, then adds it to __all__ so that you can 
import it from collections_.  The only caveat is that you have to import 
collections_.set and collections_.frozenset to override the default 
implementations, but it works.

-Michael Lenzen



More information about the Python-ideas mailing list