Commit 7353705c authored by Nicolas Dumazet's avatar Nicolas Dumazet

readability: not(not(x)) -> bool(x)


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@29760 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 25a51178
......@@ -554,7 +554,7 @@ class SimulationTool(BaseTool):
class DictMixIn(dict):
def set(dictionary, key, value):
result = not(not(value))
result = bool(value)
if result:
dictionary[key] = value
return result
......
......@@ -219,5 +219,5 @@ class Tester(ListGetter):
"""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))
......@@ -110,7 +110,7 @@ def DateTime_parse(self, st, datefmt=getDefaultDateFormat()):
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)
......
......@@ -60,7 +60,7 @@ class datastream:
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""")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment