public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Zac Medico (zmedico)" <zmedico@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] portage r10810 - main/trunk/pym/portage
Date: Fri, 27 Jun 2008 06:44:30 +0000	[thread overview]
Message-ID: <E1KC7h8-0004aR-9m@stork.gentoo.org> (raw)

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



                 reply	other threads:[~2008-06-27  6:44 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1KC7h8-0004aR-9m@stork.gentoo.org \
    --to=zmedico@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox