[pypy-svn] r56024 - pypy/dist/pypy/tool/algo

arigo at codespeak.net arigo at codespeak.net
Sun Jun 22 13:39:39 CEST 2008


Author: arigo
Date: Sun Jun 22 13:39:39 2008
New Revision: 56024

Modified:
   pypy/dist/pypy/tool/algo/graphlib.py
Log:
Fix.


Modified: pypy/dist/pypy/tool/algo/graphlib.py
==============================================================================
--- pypy/dist/pypy/tool/algo/graphlib.py	(original)
+++ pypy/dist/pypy/tool/algo/graphlib.py	Sun Jun 22 13:39:39 2008
@@ -112,7 +112,7 @@
     rep = {}    # maps all vertices to a random representing vertex
                 # from the same strongly connected component
     for component in strong_components(vertices, edges):
-        random_vertex = component.pop()
+        random_vertex, _ = component.popitem()
         rep[random_vertex] = random_vertex
         for v in component:
             rep[v] = random_vertex



More information about the Pypy-commit mailing list