On 03/06/2011 02:57, Roy Smith wrote:
In article<94ph22frh...@mid.individual.net>,
Neil Cerutti<ne...@norwich.edu> wrote:
On 2011-06-01, ru...@yahoo.com<ru...@yahoo.com> wrote:
For some odd reason (perhaps because they are used a lot in
Perl), this groups seems to have a great aversion to regular
expressions. Too bad because this is a typical problem where
their use is the best solution.
Python's str methods, when they're sufficent, are usually more
efficient.
I was all set to say, "prove it!" when I decided to try an experiment.
Much to my surprise, for at least one common case, this is indeed
correct.
[snip]
I've tested it on my PC for Python 2.7 (bytestring) and Python 3.1
(Unicode) and included the "regex" module on PyPI:
Python 2.7:
0.949936333562
4.31320052965
1.14035334748
Python 3.1:
1.27268308633
4.2509511537
1.16866839819
--
http://mail.python.org/mailman/listinfo/python-list