[Python-3000] Small renaming suggestion: re.sub() -> re.replace() or re.substitute() (original) (raw)
Facundo Batista facundobatista at gmail.com
Fri Oct 5 12:45:54 CEST 2007
- Previous message: [Python-3000] Small renaming suggestion: re.sub() -> re.replace() or re.substitute()
- Next message: [Python-3000] PEP 3137 plan of attack
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
2007/10/5, Mark Summerfield <mark at qtrac.eu>:
Although re.substitute() would work (and be better than sub), I think re.replace() is better and more consistent regarding the rest of the library.
+1, happened twice to me, different jobs, that a colleague came to me asking why there was no "replace" in "re".
Yes, sub() is even difficult to find (unless you read all the descriptions of the methods).
Regards,
-- . Facundo
Blog: http://www.taniquetil.com.ar/plog/ PyAr: http://www.python.org/ar/
- Previous message: [Python-3000] Small renaming suggestion: re.sub() -> re.replace() or re.substitute()
- Next message: [Python-3000] PEP 3137 plan of attack
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]