|
From: <di...@us...> - 2010-11-22 02:03:25
|
Revision: 710
http://safekeep.svn.sourceforge.net/safekeep/?rev=710&view=rev
Author: dimi
Date: 2010-11-22 02:03:19 +0000 (Mon, 22 Nov 2010)
Log Message:
-----------
Add back the Python 2.2 compatibilty hacks
Modified Paths:
--------------
safekeep/trunk/safekeep
Modified: safekeep/trunk/safekeep
===================================================================
--- safekeep/trunk/safekeep 2010-11-21 20:10:12 UTC (rev 709)
+++ safekeep/trunk/safekeep 2010-11-22 02:03:19 UTC (rev 710)
@@ -31,6 +31,24 @@
use_subprocess = False
######################################################################
+# Python 2.2 compatibility
+######################################################################
+# There is no guarantee that we'll continue supporting Python 2.2
+# indefinitely, but we make a reasonable effor to do so as long as
+# it doesn't result in major complication/ugliness.
+
+try:
+ True, False
+except NameError:
+ True, False = 1, 0
+
+def enumerate(obj):
+ i = -1
+ for item in obj:
+ i += 1
+ yield i, item
+
+######################################################################
# Global settings
######################################################################
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|