[issue35846] Incomplete documentation for re.sub

2019-02-14 Thread Serhiy Storchaka
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

[issue35846] Incomplete documentation for re.sub

2019-01-31 Thread Windson Yang
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

[issue35846] Incomplete documentation for re.sub

2019-01-29 Thread Pascal Bugnion
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