This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2019年01月29日 08:06 by pbugnion, last changed 2022年04月11日 14:59 by admin. This issue is now closed.
| Messages (3) | |||
|---|---|---|---|
| msg334504 - (view) | Author: Pascal Bugnion (pbugnion) | Date: 2019年01月29日 08:06 | |
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. |
|||
| msg334642 - (view) | Author: Windson Yang (Windson Yang) * | Date: 2019年02月01日 01:46 | |
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))
|
|||
| msg335543 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2019年02月14日 16:47 | |
This is a duplicate of issue28450. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:59:10 | admin | set | github: 80027 |
| 2019年02月14日 16:47:40 | serhiy.storchaka | set | status: open -> closed superseder: Misleading/inaccurate documentation about unknown escape sequences in regular expressions nosy: + serhiy.storchaka messages: + msg335543 resolution: duplicate stage: resolved |
| 2019年02月01日 01:46:34 | Windson Yang | set | nosy:
+ Windson Yang messages: + msg334642 |
| 2019年01月29日 08:06:08 | pbugnion | create | |