Message372106
| Author |
Yujiri |
| Recipients |
Yujiri, ezio.melotti, mrabarnett |
| Date |
2020年06月22日.18:04:10 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<CAKSVUBLCzCfWOk987=a2nbv1H3M7gu2Lzyvac+quYXHHdXFJdA@mail.gmail.com> |
| In-reply-to |
<1592848454.56.0.661343299041.issue41080@roundup.psfhosted.org> |
| Content |
Sorry, I forgot the pydoc docs don't have as much information as the online
docs.
On Mon, Jun 22, 2020 at 1:54 PM Ezio Melotti <report@bugs.python.org> wrote:
>
> Ezio Melotti <ezio.melotti@gmail.com> added the comment:
>
> This behavior was changed in 3.7: "Empty matches for the pattern are
> replaced only when not adjacent to a previous empty match, so sub('x*',
> '-', 'abxd') returns '-a-b--d-'." [0]
>
> See also bpo-32308 and bpo-25054.
>
>
> [0]: https://docs.python.org/3/library/re.html#re.sub
>
> ----------
> resolution: -> not a bug
> stage: -> resolved
> status: open -> closed
> superseder: -> Replace empty matches adjacent to a previous non-empty
> match in re.sub()
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <https://bugs.python.org/issue41080>
> _______________________________________
> |
|