RELEASED: Python 2.2a1

Guido van Rossum guido at python.org
Thu Jul 19 08:56:10 EDT 2001


Carsten Gaebler <clpy at snakefarm.org> writes:

> However, I'd like to suggest a small syntax enhancement. Additionally to 'for
> key in dict:' being equivalent to 'for key in dict.iterkeys():' it would be
> really nice to have some magic that makes 'for (key, value) in dict:'
> equivalent to 'for (key, value) in dict.iteritems():'.

Sorry, this has been discussed to death in the iterators list.
There's no good solution.  The PEP has a summary of the discussion.
Please don't start this again!

--Guido van Rossum (home page: http://www.python.org/~guido/)



More information about the Python-list mailing list