[IMP] tools: removed __builtin__.{all,any} (they were there for previous python versi...
authorVo Minh Thu <vmt@openerp.com>
Wed, 18 Jan 2012 11:46:40 +0000 (12:46 +0100)
committerVo Minh Thu <vmt@openerp.com>
Wed, 18 Jan 2012 11:46:40 +0000 (12:46 +0100)
bzr revid: vmt@openerp.com-20120118114640-sm71f9fi48n4qn3q

openerp/tools/misc.py

index b888c89..67e4fd6 100644 (file)
@@ -545,28 +545,6 @@ class currency(float):
 def to_xml(s):
     return s.replace('&','&amp;').replace('<','&lt;').replace('>','&gt;')
 
-# to be compatible with python 2.4
-import __builtin__
-if not hasattr(__builtin__, 'all'):
-    def all(iterable):
-        for element in iterable:
-            if not element:
-                return False
-        return True
-
-    __builtin__.all = all
-    del all
-
-if not hasattr(__builtin__, 'any'):
-    def any(iterable):
-        for element in iterable:
-            if element:
-                return True
-        return False
-
-    __builtin__.any = any
-    del any
-
 def get_iso_codes(lang):
     if lang.find('_') != -1:
         if lang.split('_')[0] == lang.split('_')[1].lower():