[Python-Dev] Complexity documentation request

"Martin v. Löwis" martin at v.loewis.de
Mon Mar 10 23:40:30 CET 2008


> I assume there is a reason that PyDict_DelItem never calls dictresize?

Yes - the assumption is that more del calls will follow, so that the
dictionary eventually ends up empty. Only when new inserts are made,
that assumption is proven wrong, and the shrinking can be done in
one sweep.

Regards,
Martin



More information about the Python-Dev mailing list