Author: Philip Jenvey <[email protected]>
Branch: py3k
Changeset: r64305:adc5e19b5567
Date: 2013-05-18 18:05 -0700
http://bitbucket.org/pypy/pypy/changeset/adc5e19b5567/

Log:    oops, expecting actual iterators

diff --git a/pypy/module/cpyext/dictobject.py b/pypy/module/cpyext/dictobject.py
--- a/pypy/module/cpyext/dictobject.py
+++ b/pypy/module/cpyext/dictobject.py
@@ -175,7 +175,7 @@
     # not complete.
 
     try:
-        w_iter = space.call_method(w_dict, "items")
+        w_iter = space.iter(space.call_method(w_dict, "items"))
         pos = ppos[0]
         while pos:
             space.next(w_iter)
diff --git a/pypy/objspace/std/unicodetype.py b/pypy/objspace/std/unicodetype.py
--- a/pypy/objspace/std/unicodetype.py
+++ b/pypy/objspace/std/unicodetype.py
@@ -348,7 +348,7 @@
                     "if you give only one argument "
                     "to maketrans it must be a dict"))
         # copy entries into the new dict, converting string keys to int keys
-        w_iter = space.call_method(w_x, "items")
+        w_iter = space.iter(space.call_method(w_x, "items"))
         while True:
             try:
                 w_item = space.next(w_iter)
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to