re.sub expands escape sequences in it's second argument.

Will backport to 2.3 myself.
1 file changed