Documentation for iteration in mappings
Steven D'Aprano
steve at REMOVETHIScyber.com.au
Tue Oct 25 13:25:35 EDT 2005
On Tue, 25 Oct 2005 18:02:47 +0200, Michael Ströder wrote:
> Dennis Benzinger wrote:
>>
>> I must be blind because I didn't find anything in the documentation
>> which says iterating over an dictionary iterates over its keys.
[snip]
>> Where is this information hidden? :)
>
> You should examine your program. Simply pasting the code above to the
> Python shell fails as expected:
Yes, this is true, but also irrelevant. The question isn't about the code,
but about the documentation.
The answer does appear to be hidden quite deeply. I had to dig out an old
"What's New" for version 2.2 to find it, hidden away in a section on
iterators:
http://aspn.activestate.com/ASPN/docs/ActivePython/2.2/whatsnew/2.2/index.html#SECTION000400000000000000000
--
Steven.
More information about the Python-list
mailing list