[Python-3000] Iterators for dict keys, values, and items == annoying :)

Greg Ewing greg.ewing at canterbury.ac.nz
Fri Mar 24 10:49:24 CET 2006


skip at pobox.com wrote:
> Still, around work I see a great preference for the longer
> (and uglier IMO) spelling.  Maybe it's a mental carryover from C++ that
> makes people what that version?

I think it's a natural tendency, and one that isn't
necessarily wrong to have. Although the iterator
version won't necessarily be quite as fast as it
could be in some situations, you at least know that
it won't perform spectacularly badly in any
situation. Think of it as a form of defensive
coding.

Greg


More information about the Python-3000 mailing list