[issue32308] Replace empty matches adjacent to a previous non-empty match in re.sub()

Anders Hovmöller report at bugs.python.org
Thu Apr 11 05:50:19 EDT 2019


Anders Hovmöller <boxed at killingar.net> added the comment:

This was a really bad idea in my opinion. We just found this and we have no way to know how this will impact production. It's really absurd that 

re.sub('(.*)', r'foo', 'asd')

is "foo" in python 1 to 3.6 but 'foofoo' in python 3.7.

----------
nosy: +Anders.Hovmöller

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32308>
_______________________________________


More information about the Python-bugs-list mailing list