[Spambayes-checkins] spambayes/Outlook2000/dialogs dialog_map.py,
1.8, 1.9
Tim Peters
tim_one at users.sourceforge.net
Mon Aug 18 12:35:50 EDT 2003
Update of /cvsroot/spambayes/spambayes/Outlook2000/dialogs
In directory sc8-pr-cvs1:/tmp/cvs-serv18049/Outlook2000/dialogs
Modified Files:
dialog_map.py
Log Message:
Supply our own enumerate() for Python versions prior to 2.3.
Index: dialog_map.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/Outlook2000/dialogs/dialog_map.py,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** dialog_map.py 18 Aug 2003 16:47:56 -0000 1.8
--- dialog_map.py 18 Aug 2003 18:35:48 -0000 1.9
***************
*** 8,11 ****
--- 8,17 ----
from dialogs import ShowDialog, MakePropertyPage
+ try:
+ enumerate
+ except NameError: # enumerate new in 2.3
+ def enumerate(seq):
+ return [(i, seq[i]) for i in xrange(len(seq))]
+
# "dialog specific" processors:
class VersionStringProcessor(ControlProcessor):
More information about the Spambayes-checkins
mailing list