I'd venture that it's a simple oversight. items() is likely taking
more memory in addition to being slower because it creates a list of
the items while iteritems simply returns an iterator.
On Mar 24, 9:51 am, David Cramer <[EMAIL PROTECTED]> wrote:
> Ive been having to dig into code vs documenta
Ive been having to dig into code vs documentation lately, and there
are *tons* of uses of items() vs iteritems(). I was wondering why this
is?
I did a quick benchmark, on an example I found in newforms, to try and
give myself an answer:
In [31]: timeit.Timer("attrs2=attrs.copy();[(field_name,
at