From: Zac Medico Date: Sun, 30 Mar 2008 03:42:27 +0000 (-0000) Subject: Use enumerate() it iterate over an array. X-Git-Tag: v2.2_pre6~302 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=03fb1641a4e47a5c467857e314f0f19a53d8bd9d;p=portage.git Use enumerate() it iterate over an array. svn path=/main/trunk/; revision=9613 --- diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index 328b7f1e9..cb369a6b9 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -3914,8 +3914,7 @@ class depgraph(object): 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]