"Delaney, Timothy (Tim)" <[EMAIL PROTECTED]> writes:
> The eventual consensus was that keys(), etc should return views on the
> dictionary. These views would be re-iterable and will have basically the
> same behaviour as the lists returned from keys(), etc. However, such a
> view could have O(1) __contains__ behaviour, and would not incur the
> overhead of creating a list and populating it - they would be backed by
> the dictionary. Of course, this introduces the issue of concurrent
> modification, but you can always get an independent copy by calling
> list(dict.keys()).

Wait a sec, you're saying

  k0 = d.keys()
  d['whee'] = 'parrot'    # this can change k0???

That sounds broken.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to