[issue8465] Backreferences vs. escapes: a silent failure solved

2010-04-21 Thread Georg Brandl
Changes by Georg Brandl ge...@python.org: -- assignee: - pitrou nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8465 ___ ___

[issue8465] Backreferences vs. escapes: a silent failure solved

2010-04-20 Thread Aaron Sherman
Aaron Sherman a...@ajs.com added the comment: Matthew, thank you for replying. I still think the primary issue is the potential for confusion between single digit escapes and backreferences, and the ease with which they could be addressed, but to cover what you said: Quote: the normal way to

[issue8465] Backreferences vs. escapes: a silent failure solved

2010-04-19 Thread Aaron Sherman
New submission from Aaron Sherman a...@ajs.com: I tested this under 2.6 and 3.1. Under both, the common mistake that I'm sure many others have made, and which cost me quite some time today was: re.sub(r'(foo)bar', '\1baz', 'foobar') It's obvious, I'm sure, to many reading this that the