Skip to content
Snippets Groups Projects
Commit 382554938436 authored by Daniel Jowett's avatar Daniel Jowett
Browse files

define an 'enumerate' function (which is not defined in Python2.2)

parent 8d2bfa3d7bd4
No related branches found
No related tags found
No related merge requests found
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
Iterator based sre token scanner Iterator based sre token scanner
""" """
from __future__ import generators from __future__ import generators
import __builtin__
__builtin__.enumerate = lambda seq: zip(xrange(len(seq)), seq)
import sre_parse, sre_compile, sre_constants import sre_parse, sre_compile, sre_constants
from sre_constants import BRANCH, SUBPATTERN from sre_constants import BRANCH, SUBPATTERN
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment