From: Zac Medico Date: Sun, 30 Mar 2008 03:42:59 +0000 (-0000) Subject: Use enumerate() to iterate over an array. (trunk r9613) X-Git-Tag: v2.1.5~291 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=e676dd3fc0b84884493190917470654b5b3e0479;p=portage.git Use enumerate() to iterate over an array. (trunk r9613) svn path=/main/branches/2.1.2/; revision=9614 --- diff --git a/bin/emerge b/bin/emerge index f477aead8..e139e2a23 100755 --- a/bin/emerge +++ b/bin/emerge @@ -3590,8 +3590,7 @@ class depgraph: if myoldbest: if myinslotlist: myoldbest = [myoldbest] - for key in myoldbest: - pos = myoldbest.index(key) + for pos, key in enumerate(myoldbest): key = portage.pkgsplit(key)[1] + "-" + portage.pkgsplit(key)[2] if key[-3:] == "-r0": key = key[:-3]