1 |
Author: zmedico |
2 |
Date: 2008-03-28 11:56:50 +0000 (Fri, 28 Mar 2008) |
3 |
New Revision: 9552 |
4 |
|
5 |
Modified: |
6 |
main/branches/2.1.2/pym/portage_dep.py |
7 |
Log: |
8 |
Make strip_empty() return a nedw list instead of working in-place. Thanks to |
9 |
Ren?\195?\169 Neumann <rene.neumann@××××××.net> for the suggestion. (trunk r9460) |
10 |
|
11 |
|
12 |
Modified: main/branches/2.1.2/pym/portage_dep.py |
13 |
=================================================================== |
14 |
--- main/branches/2.1.2/pym/portage_dep.py 2008-03-28 11:51:54 UTC (rev 9551) |
15 |
+++ main/branches/2.1.2/pym/portage_dep.py 2008-03-28 11:56:50 UTC (rev 9552) |
16 |
@@ -44,10 +44,7 @@ |
17 |
@rtype: Array |
18 |
@return: The array with empty elements removed |
19 |
""" |
20 |
- for x in range(len(myarr)-1, -1, -1): |
21 |
- if not myarr[x]: |
22 |
- del myarr[x] |
23 |
- return myarr |
24 |
+ return [x for x in myarr if x] |
25 |
|
26 |
def paren_reduce(mystr,tokenize=1): |
27 |
""" |
28 |
|
29 |
-- |
30 |
gentoo-commits@l.g.o mailing list |