[Python-Dev] Repeatability of looping over dicts
Fred Drake
fdrake at acm.org
Sat Jan 5 00:02:40 CET 2008
On Jan 4, 2008, at 5:54 PM, Guido van Rossum wrote:
> What code would break if we loosened this restriction? I guess
> defining d.items() as zip(d.keys(), d.values()) would no longer fly,
> but does anyone actually depend on this?
I don't know what code would break today; this was initially added to
the set of promises made by the dict methods a decode ago, but it was
in response to a need in the software I was working on at the time
(possibly Grail, for which 2.6/3.0 isn't an issue).
That question should probably be addressed to a fairly wide audience
(comp.lang.python) since the promise has been there for so long.
-Fred
--
Fred Drake <fdrake at acm.org>
More information about the Python-Dev
mailing list