diff mercurial/util.py @ 25152:ac2e66f481c9

util: drop any() and all() polyfills
author Augie Fackler <augie@google.com>
date Sat, 16 May 2015 14:37:24 -0400
parents 0ca8410ea345
children 277a535c0b3a
line wrap: on
line diff
--- a/mercurial/util.py	Sat May 16 14:34:19 2015 -0400
+++ b/mercurial/util.py	Sat May 16 14:37:24 2015 -0400
@@ -1720,21 +1720,6 @@
         if prevhandler is not None:
             signal.signal(signal.SIGCHLD, prevhandler)
 
-try:
-    any, all = any, all
-except NameError:
-    def any(iterable):
-        for i in iterable:
-            if i:
-                return True
-        return False
-
-    def all(iterable):
-        for i in iterable:
-            if not i:
-                return False
-        return True
-
 def interpolate(prefix, mapping, s, fn=None, escape_prefix=False):
     """Return the result of interpolating items in the mapping into string s.