Fredrik> Skip Montanaro wrote:
    >> That doubles your storage

    Fredrik> careful: it creates another dictionary structure with the same
    Fredrik> size as the first one, but it doesn't copy the objects in the
    Fredrik> dictionary.

Yes, sorry.  The OP indicated the original dictionary was very big, so it
seemed like duplicating the dictionary storage would potentially be costly
since dictionaries hold extra storage (on average, twice the storage needed
to hold the references to its keys?) to support O(1) average time lookup.

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

Reply via email to