[Python-Dev] PEP 372 -- Adding an ordered directory to collections ready for pronouncement

Raymond Hettinger python at rcn.com
Wed Mar 4 12:43:36 CET 2009


>> Beware, deleting an item from an OrderedDict (in the current
>> implementation) is O(N).
> 
> Am I correct in presuming that that would not be true of .popitem?

Yes.  The popitem() method is O(1).


Raymond


More information about the Python-Dev mailing list