[Python-ideas] Give regex operations more sugar

Jacco van Dorp j.van.dorp at deonet.nl
Fri Jun 15 02:45:55 EDT 2018

from a lurker's perspective, why not just implement str.compile() as
new method, and methods where it's relevant support it's result as
argument ? That's a small change in additions, and the other methods
in the normal case just do the same as now. It's also pretty clear
what things like "whatever".replace("regex".compile(), "otherstring")
should do in that case.

More information about the Python-ideas mailing list