My fix for #3 broke the case of p.replace(p.re()). While that case isn't always predictable, it was usable within limits.
The manual notes
all lines that test False ('', {}, [], False, 0) are eliminated from the output completely. You can instead print out a blank line if something tests false using --keep_false.
the re() function should return to returning an empty line on no match. The correct fix for #3 is filtering out '' lines at the output stage.
My fix for #3 broke the case of
p.replace(p.re())
. While that case isn't always predictable, it was usable within limits.The manual notes
the re() function should return to returning an empty line on no match. The correct fix for #3 is filtering out
''
lines at the output stage.