[Erp5-report] r29760 - in /erp5/trunk/products: ERP5/Tool/ ERP5Type/Accessor/ ERP5Type/patc...

nobody at svn.erp5.org nobody at svn.erp5.org
Fri Oct 16 14:30:03 CEST 2009


Author: nicolas.dumazet
Date: Fri Oct 16 14:30:00 2009
New Revision: 29760

URL: http://svn.erp5.org?rev=29760&view=rev
Log:
readability: not(not(x)) -> bool(x)

Modified:
    erp5/trunk/products/ERP5/Tool/SimulationTool.py
    erp5/trunk/products/ERP5Type/Accessor/Category.py
    erp5/trunk/products/ERP5Type/patches/DateTimePatch.py
    erp5/trunk/products/PortalTransforms/data.py

Modified: erp5/trunk/products/ERP5/Tool/SimulationTool.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Tool/SimulationTool.py?rev=29760&r1=29759&r2=29760&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Tool/SimulationTool.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Tool/SimulationTool.py [utf8] Fri Oct 16 14:30:00 2009
@@ -554,7 +554,7 @@
 
       class DictMixIn(dict):
         def set(dictionary, key, value):
-          result = not(not(value))
+          result = bool(value)
           if result:
             dictionary[key] = value
           return result

Modified: erp5/trunk/products/ERP5Type/Accessor/Category.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/Accessor/Category.py?rev=29760&r1=29759&r2=29760&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/Accessor/Category.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/Accessor/Category.py [utf8] Fri Oct 16 14:30:00 2009
@@ -219,5 +219,5 @@
   """Tests if the category is set.
   """
   def __call__(self, instance, *args, **kw):
-    return not not ListGetter.__call__(self, instance, *args, **kw)
-
+    return bool(ListGetter.__call__(self, instance, *args, **kw))
+

Modified: erp5/trunk/products/ERP5Type/patches/DateTimePatch.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/patches/DateTimePatch.py?rev=29760&r1=29759&r2=29760&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/patches/DateTimePatch.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/patches/DateTimePatch.py [utf8] Fri Oct 16 14:30:00 2009
@@ -110,7 +110,7 @@
       ls=len(s)
       i=i+ls
       if (ls==4 and d and d in '+-' and
-          (len(ints) + (not not month) >= 3)):
+          (len(ints) + bool(month) >= 3)):
           tz='%s%s' % (d,s)
       else:
           v=int(s)

Modified: erp5/trunk/products/PortalTransforms/data.py
URL: http://svn.erp5.org/erp5/trunk/products/PortalTransforms/data.py?rev=29760&r1=29759&r2=29760&view=diff
==============================================================================
--- erp5/trunk/products/PortalTransforms/data.py [utf8] (original)
+++ erp5/trunk/products/PortalTransforms/data.py [utf8] Fri Oct 16 14:30:00 2009
@@ -60,7 +60,7 @@
     def setCacheable(self, value):
         """Set cacheable flag to yes or no
         """
-        self._cacheable = not not value
+        self._cacheable = bool(value)
 
     #data = property('getData', 'setData', None, """idata.data""")
 




More information about the Erp5-report mailing list