public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] portage r10810 - main/trunk/pym/portage
@ 2008-06-27  6:44 Zac Medico (zmedico)
  0 siblings, 0 replies; only message in thread
From: Zac Medico (zmedico) @ 2008-06-27  6:44 UTC (permalink / raw
  To: gentoo-commits

Author: zmedico
Date: 2008-06-27 06:44:29 +0000 (Fri, 27 Jun 2008)
New Revision: 10810

Modified:
   main/trunk/pym/portage/util.py
Log:
Use bool() to simplify ObjectProxy.__nonzero__().


Modified: main/trunk/pym/portage/util.py
===================================================================
--- main/trunk/pym/portage/util.py	2008-06-27 04:00:48 UTC (rev 10809)
+++ main/trunk/pym/portage/util.py	2008-06-27 06:44:29 UTC (rev 10810)
@@ -969,9 +969,7 @@
 		return object.__getattribute__(self, '_get_target')() != other
 
 	def __nonzero__(self):
-		if object.__getattribute__(self, '_get_target')():
-			return True
-		return False
+		return bool(object.__getattribute__(self, '_get_target')())
 
 class LazyItemsDict(dict):
 	"""A mapping object that behaves like a standard dict except that it allows

-- 
gentoo-commits@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-06-27  6:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-27  6:44 [gentoo-commits] portage r10810 - main/trunk/pym/portage Zac Medico (zmedico)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox