This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author swamiyeswanth
Recipients SilentGhost, akuchling, amaury.forgeotdarc, belopolsky, benjamin.peterson, bjourne, donlorenzo, ezio.melotti, foom, georg.brandl, mortenlj, mrabarnett, pitrou, rsc, swamiyeswanth, timehorse, zanella
Date 2011-01-13.17:13:40
SpamBayes Score 0.0022025548
Marked as misclassified No
Message-id <1294938821.87.0.458861763863.issue2650@psf.upfronthosting.co.za>
In-reply-to
Content
@James test results for py3k 


python -m timeit -s "$(printf "import re\ndef escape(s):\n return re.sub('([][.^$*+?{}\\|()])', '\\\1', s)")" 'escape("!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()")'

100000 loops, best of 3: 17.1 usec per loop


python -m timeit -s "import re" 're.escape("!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()")'

10000 loops, best of 3: 102 usec per loop
History
Date User Action Args
2011-01-13 17:13:41swamiyeswanthsetrecipients: + swamiyeswanth, akuchling, georg.brandl, amaury.forgeotdarc, belopolsky, foom, pitrou, rsc, timehorse, benjamin.peterson, zanella, donlorenzo, ezio.melotti, bjourne, mortenlj, mrabarnett, SilentGhost
2011-01-13 17:13:41swamiyeswanthsetmessageid: <1294938821.87.0.458861763863.issue2650@psf.upfronthosting.co.za>
2011-01-13 17:13:40swamiyeswanthlinkissue2650 messages
2011-01-13 17:13:40swamiyeswanthcreate