Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 204770 Details for
Bug 276813
sys-apps/portage Performance improvement
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Simplify match_to_list down to single list comprehension
simplify_match_to_list.patch (text/plain), 581 bytes, created by
Marat Radchenko
on 2009-09-21 07:08:33 UTC
(
hide
)
Description:
Simplify match_to_list down to single list comprehension
Filename:
MIME Type:
Creator:
Marat Radchenko
Created:
2009-09-21 07:08:33 UTC
Size:
581 bytes
patch
obsolete
>diff --git a/pym/portage/dep.py b/pym/portage/dep.py >index ebdf1ea..0d3cc50 100644 >--- a/pym/portage/dep.py >+++ b/pym/portage/dep.py >@@ -944,14 +944,7 @@ def match_to_list(mypkg, mylist): > @rtype: List > @return: A unique list of package atoms that match the given package atom > """ >- matches = [] >- for x in mylist: >- if not isinstance(x, Atom): >- x = Atom(x) >- if match_from_list(x, [mypkg]): >- if x not in matches: >- matches.append(x) >- return matches >+ return [ x for x in set(mylist) if match_from_list(x, [mypkg]) ] > > def best_match_to_list(mypkg, mylist): > """
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 276813
:
196987
|
197434
|
197437
|
197827
|
198253
|
203267
|
203269
|
203406
|
203509
|
203512
|
203515
|
203519
|
204572
|
204597
|
204673
|
204685
|
204770
|
204883
|
204996
|
205039