[Python-checkins] r54775 - sandbox/trunk/2to3/fixes/util.py
collin.winter
python-checkins at python.org
Thu Apr 12 07:34:30 CEST 2007
Author: collin.winter
Date: Thu Apr 12 07:34:30 2007
New Revision: 54775
Modified:
sandbox/trunk/2to3/fixes/util.py
Log:
Add reversed() for 2.3-compat.
Modified: sandbox/trunk/2to3/fixes/util.py
==============================================================================
--- sandbox/trunk/2to3/fixes/util.py (original)
+++ sandbox/trunk/2to3/fixes/util.py Thu Apr 12 07:34:30 2007
@@ -117,6 +117,12 @@
set = set
except NameError:
from sets import Set as set
+
+try:
+ reversed = reversed
+except NameError:
+ def reversed(l):
+ return l[::-1]
###########################################################
### The following functions are to find bindings in a suite
More information about the Python-checkins
mailing list