Message141387
| Author |
r.david.murray |
| Recipients |
anacrolix, brandon-rhodes, eric.araujo, eric.smith, ezio.melotti, georg.brandl, python-dev, r.david.murray, vstinner, xuanji |
| Date |
2011年07月29日.15:20:12 |
| SpamBayes Score |
0.0010799869 |
| Marked as misclassified |
No |
| Message-id |
<1311952813.69.0.67825707355.issue9723@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
You aren't using a regex to replace the quotes, either.
>>> len('abcd'.translate(str.maketrans('', '', string.ascii_letters ))) > 0
False
I don't know if this is faster than the corresponding search regex, but depending on how much overhead regex has, it might be. Note that the translate table can be pre-built, just like the compiled regex. |
|