Serhiy Storchaka added the comment:
This is a duplicate of issue28450.
--
nosy: +serhiy.storchaka
resolution: -> duplicate
stage: -> resolved
status: open -> closed
superseder: -> Misleading/inaccurate documentation about unknown escape
sequences in regular expressions
Windson Yang added the comment:
I wonder if possible that c not in ASCIILETTERS when we get KeyError?
if c in ASCIILETTERS:
raise s.error('bad escape %s' % this, len(this))
--
nosy: +Windson Yang
___
Python tracker
New submission from Pascal Bugnion :
The documentation for `re.sub` states that "Unknown escapes such as ``\&`` are
left alone.". This is only true for escapes which are not ascii characters, as
far as I can tell (c.f. source on