1 |
Author: zmedico |
2 |
Date: 2008-06-27 06:44:29 +0000 (Fri, 27 Jun 2008) |
3 |
New Revision: 10810 |
4 |
|
5 |
Modified: |
6 |
main/trunk/pym/portage/util.py |
7 |
Log: |
8 |
Use bool() to simplify ObjectProxy.__nonzero__(). |
9 |
|
10 |
|
11 |
Modified: main/trunk/pym/portage/util.py |
12 |
=================================================================== |
13 |
--- main/trunk/pym/portage/util.py 2008-06-27 04:00:48 UTC (rev 10809) |
14 |
+++ main/trunk/pym/portage/util.py 2008-06-27 06:44:29 UTC (rev 10810) |
15 |
@@ -969,9 +969,7 @@ |
16 |
return object.__getattribute__(self, '_get_target')() != other |
17 |
|
18 |
def __nonzero__(self): |
19 |
- if object.__getattribute__(self, '_get_target')(): |
20 |
- return True |
21 |
- return False |
22 |
+ return bool(object.__getattribute__(self, '_get_target')()) |
23 |
|
24 |
class LazyItemsDict(dict): |
25 |
"""A mapping object that behaves like a standard dict except that it allows |
26 |
|
27 |
-- |
28 |
gentoo-commits@l.g.o mailing list |