From: Zac Medico Date: Fri, 17 Mar 2006 01:53:47 +0000 (-0000) Subject: Use the built-in bool() function to convert 1 or 0 to True or False as recommended... X-Git-Tag: v2.1_pre7~66 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=3887953e350518ed3ffdae281e3c7d3949174166;p=portage.git Use the built-in bool() function to convert 1 or 0 to True or False as recommended by marienz. svn path=/main/trunk/; revision=2909 --- diff --git a/pym/portage.py b/pym/portage.py index 00f0822ae..1c2731086 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -1578,9 +1578,7 @@ class config: def __contains__(self, mykey): """Called to implement membership test operators (in and not in).""" - if self.has_key(mykey): - return True - return False + return bool(self.has_key(mykey)) def keys(self): mykeys=[]