Message372106
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 <[email protected]> wrote:
>
> Ezio Melotti <[email protected]> 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 <[email protected]>
> <https://bugs.python.org/issue41080>
> _______________________________________
> |
|
| Date |
User |
Action |
Args |
| 2020-06-22 18:04:10 | Yujiri | set | recipients:
+ Yujiri, ezio.melotti, mrabarnett |
| 2020-06-22 18:04:10 | Yujiri | link | issue41080 messages |
| 2020-06-22 18:04:10 | Yujiri | create | |
|