[pypy-svn] r78893 - pypy/branch/fast-forward/lib_pypy

afa at codespeak.net afa at codespeak.net
Mon Nov 8 21:40:33 CET 2010


Author: afa
Date: Mon Nov  8 21:40:31 2010
New Revision: 78893

Modified:
   pypy/branch/fast-forward/lib_pypy/_collections.py
Log:
deque: Fix "d.extend(d)"


Modified: pypy/branch/fast-forward/lib_pypy/_collections.py
==============================================================================
--- pypy/branch/fast-forward/lib_pypy/_collections.py	(original)
+++ pypy/branch/fast-forward/lib_pypy/_collections.py	Mon Nov  8 21:40:31 2010
@@ -76,6 +76,8 @@
             self.pop()
 
     def extend(self, iterable):
+        if iterable is self:
+            iterable = list(iterable)
         for elem in iterable:
             self.append(elem)
 



More information about the Pypy-commit mailing list