Author: Amaury Forgeot d'Arc <[email protected]>
Branch: py3.3
Changeset: r82025:61cf3585f0f7
Date: 2016-02-01 01:08 +0100
http://bitbucket.org/pypy/pypy/changeset/61cf3585f0f7/
Log: Add pickle support to iter(dequeue())
diff --git a/pypy/module/_collections/__init__.py
b/pypy/module/_collections/__init__.py
--- a/pypy/module/_collections/__init__.py
+++ b/pypy/module/_collections/__init__.py
@@ -12,6 +12,8 @@
interpleveldefs = {
'deque' : 'interp_deque.W_Deque',
+ 'deque_iterator' : 'interp_deque.W_DequeIter',
+ 'deque_reverse_iterator' : 'interp_deque.W_DequeRevIter',
'__missing__': 'interp_defaultdict.missing',
}
diff --git a/pypy/module/_collections/interp_deque.py
b/pypy/module/_collections/interp_deque.py
--- a/pypy/module/_collections/interp_deque.py
+++ b/pypy/module/_collections/interp_deque.py
@@ -537,7 +537,7 @@
self.index = ri
return w_x
-W_DequeIter.typedef = TypeDef("deque_iterator",
+W_DequeIter.typedef = TypeDef("_collections.deque_iterator",
__iter__ = interp2app(W_DequeIter.iter),
__length_hint__ = interp2app(W_DequeIter.length),
__next__ = interp2app(W_DequeIter.next),
@@ -580,7 +580,7 @@
self.index = ri
return w_x
-W_DequeRevIter.typedef = TypeDef("deque_reverse_iterator",
+W_DequeRevIter.typedef = TypeDef("_collections.deque_reverse_iterator",
__iter__ = interp2app(W_DequeRevIter.iter),
__length_hint__ = interp2app(W_DequeRevIter.length),
__next__ = interp2app(W_DequeRevIter.next),
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit