This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author donlorenzo
Recipients benjamin.peterson, donlorenzo, rsc
Date 2008-04-28.17:23:08
SpamBayes Score 0.018980742
Marked as misclassified No
Message-id <1209403468.57.0.396282837541.issue2650@psf.upfronthosting.co.za>
In-reply-to
Content
>> 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.
History
Date User Action Args
2008-04-28 17:24:46donlorenzosetspambayes_score: 0.0189807 -> 0.018980742
recipients: + donlorenzo, rsc, benjamin.peterson
2008-04-28 17:24:28donlorenzosetspambayes_score: 0.0189807 -> 0.0189807
messageid: <1209403468.57.0.396282837541.issue2650@psf.upfronthosting.co.za>
2008-04-28 17:24:25donlorenzolinkissue2650 messages
2008-04-28 17:24:23donlorenzocreate