[Python-checkins] distutils2: reintroduced any (used by python2.4)
tarek.ziade
python-checkins at python.org
Sun Jan 30 15:20:15 CET 2011
tarek.ziade pushed e7d29219343d to distutils2:
http://hg.python.org/distutils2/rev/e7d29219343d
changeset: 980:e7d29219343d
tag: tip
user: Tarek Ziade <tarek at ziade.org>
date: Sun Jan 30 15:20:08 2011 +0100
summary:
reintroduced any (used by python2.4)
files:
distutils2/_backport/__init__.py
diff --git a/distutils2/_backport/__init__.py b/distutils2/_backport/__init__.py
--- a/distutils2/_backport/__init__.py
+++ b/distutils2/_backport/__init__.py
@@ -1,2 +1,8 @@
"""Things that will land in the Python 3.3 std lib but which we must drag along
-with us for now to support 2.x."""
+ us for now to support 2.x."""
+
+def any(seq):
+ for elem in seq:
+ if elem:
+ return True
+ return False
--
Repository URL: http://hg.python.org/distutils2
More information about the Python-checkins
mailing list