From ad6b0f1c6b3d79a8a8a17ea38ead4b5936f11917 Mon Sep 17 00:00:00 2001 From: cclauss Date: Sat, 25 Nov 2017 12:46:31 +0100 Subject: [PATCH] Modernize Python 2 code to get ready for Python 3 --- Graphs/basic-graphs.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Graphs/basic-graphs.py b/Graphs/basic-graphs.py index c18574fa9..6e433b5bd 100644 --- a/Graphs/basic-graphs.py +++ b/Graphs/basic-graphs.py @@ -187,8 +187,8 @@ def adjm(): """ -def floy(xxx_todo_changeme): - (A, n) = xxx_todo_changeme +def floy(A_and_n): + (A, n) = A_and_n dist = list(A) path = [[0] * n for i in xrange(n)] for k in xrange(n): @@ -259,9 +259,9 @@ def edglist(): """ -def krusk(xxx_todo_changeme1): +def krusk(E_and_n): # Sort edges on the basis of distance - (E, n) = xxx_todo_changeme1 + (E, n) = E_and_n E.sort(reverse=True, key=lambda x: x[2]) s = [set([i]) for i in range(1, n + 1)] while True: