[Hrvoje Niksic]
> It seems that __delitem__ of an existing key is O(n), whereas it's
> amortized constant time for dicts.  (__setitem__ is constant time for
> both.)  Is there a way to avoid this?

I don't see any fast/clean way.  It's possible to tracking pending
deletions
and do them all at once but that's a bit messy and slow.


> If not, it should probably be documented, since it differs from dict.

That makes sense.


Raymond

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to