Double replace or single re.sub?

SPE - Stani's Python Editor spe.stani.be at gmail.com
Wed Oct 26 12:53:15 EDT 2005


Of course it is better to precompile the expression, but I guess
replace will beat even a precompiled regular expression. You could see
this posting:
http://groups.google.nl/group/comp.lang.python/msg/32af24eab9024f60?&hl=nl&q=replace+re+speed+python+sub

But performance should be measured, not guessed.

Stani
--
SPE - Stani's Python Editor
http://pythonide.stani.be
http://pythonide.stani.be/manual/html/manual.html




More information about the Python-list mailing list