Lorenz Quack <[EMAIL PROTECTED]> added the comment: >> The loop in escape should really use enumerate >> instead of "for i in range(len(pattern))". > >It needs i to edit s[i].
enumerate(iterable) returns a tuple for each element in iterable containing the index and the element itself. I attached a patch using enumerate. The patch also uses a frozenset rather than a dict for the special characters. ---------- nosy: +donlorenzo Added file: http://bugs.python.org/file10130/re.patch __________________________________ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2650> __________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com