Dictionary .keys() and .values() should return a set [with Python3000 in mind]

Paul Rubin http
Mon Jul 3 04:53:04 EDT 2006


"cmdrrickhunter at yaho.com" <conrad.ammon at gmail.com> writes:
> And a "view" of the dictionary is orders faster than creating a copy of
> it (which is required to keep k0 from changing in your example).  If
> you're LUCKY, copying a dictionary is O(n), 

There are ways to do it so you don't have to copy, but the dict would
then no longer be a straightforward hash table.



More information about the Python-list mailing list