Use a frozenset instead of a list for containment tests.
authorZac Medico <zmedico@gentoo.org>
Thu, 29 May 2008 23:10:33 +0000 (23:10 -0000)
committerZac Medico <zmedico@gentoo.org>
Thu, 29 May 2008 23:10:33 +0000 (23:10 -0000)
svn path=/main/trunk/; revision=10489

pym/_emerge/__init__.py

index b818c3225a16758ded8c515ff6b56c52cdfbd24e..df29f0462ce6a878d54b1fe11d0b98c747bac328 100644 (file)
@@ -4737,10 +4737,9 @@ class depgraph(object):
                                        forced_flags.update(pkgsettings.useforce)
                                        forced_flags.update(pkgsettings.usemask)
 
-                                       cur_iuse = list(pkg.iuse.all)
-                                       cur_iuse.sort()
                                        cur_use = [flag for flag in pkg.use.enabled \
-                                               if flag in cur_iuse]
+                                               if flag in pkg.iuse.all]
+                                       cur_iuse = sorted(pkg.iuse.all)
 
                                        if myoldbest and myinslotlist:
                                                previous_cpv = myoldbest[0]