[issue2650] re.escape should not escape underscore

Benjamin Peterson report at bugs.python.org
Thu Apr 24 03:30:05 CEST 2008


Benjamin Peterson <musiccomposition at gmail.com> added the comment:

Thanks.

The loop in escape should really use enumerate instead of "for i in
range(len(pattern))".

Instead of using a loop, can't the test just use
"self.assertEqual(re.esacpe(same), same)?" Also, please add tests for
what re.escape should escape.

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue2650>
__________________________________


More information about the Python-bugs-list mailing list