[Python-Dev] Complexity documentation request

"Martin v. Löwis" martin at v.loewis.de
Mon Mar 10 00:03:05 CET 2008


> Dict access should probably be documented as no worse
> than O(log n) to allow for tree implementations.

That should not be documented. The current dict implementation
may use O(n) for lookup operations, where n is the number of
keys in the dictionary, and counting comparison operations.

Regards,
Martin


More information about the Python-Dev mailing list