New submission from Pascal Bugnion <pas...@bugnion.org>:

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 
https://github.com/python/cpython/blob/master/Lib/sre_parse.py#L1047).

Would there be value in amending that documentation to either remove that 
sentence or to clarify it? If so, I'm happy to submit a PR on GitHub.

----------
components: Regular Expressions
messages: 334504
nosy: ezio.melotti, mrabarnett, pbugnion
priority: normal
severity: normal
status: open
title: Incomplete documentation for re.sub
versions: Python 3.7, Python 3.8

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue35846>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to