[New-bugs-announce] [issue35846] Incomplete documentation for re.sub

Pascal Bugnion report at bugs.python.org
Tue Jan 29 03:06:08 EST 2019


New submission from Pascal Bugnion <pascal at 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 <report at bugs.python.org>
<https://bugs.python.org/issue35846>
_______________________________________


More information about the New-bugs-announce mailing list