[Python-ideas] Give regex operations more sugar

Greg Ewing greg.ewing at canterbury.ac.nz
Wed Jun 13 20:15:17 EDT 2018

Chris Angelico wrote:
> This would want to be semantically different from chained
> calls, in that a single replace([x,y,z], q) would avoid re-replacing;

+1, this would be REALLY handy!

It's easy to trip yourself up with chained replacements
if you're not careful -- like I did once when escaping
things using &xxx; sequences in XML. If you don't do it
in the right order, you end up escaping some of the &s
you just inserted. :-(


More information about the Python-ideas mailing list