Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #38352 > unrolled thread

Re: Curious to see alternate approach on a search/replace via regex

Started byDemian Brecht <demianbrecht@gmail.com>
First post2013-02-07 07:08 -0800
Last post2013-02-07 07:08 -0800
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python


Contents

  Re: Curious to see alternate approach on a search/replace via regex Demian Brecht <demianbrecht@gmail.com> - 2013-02-07 07:08 -0800

#38352 — Re: Curious to see alternate approach on a search/replace via regex

FromDemian Brecht <demianbrecht@gmail.com>
Date2013-02-07 07:08 -0800
SubjectRe: Curious to see alternate approach on a search/replace via regex
Message-ID<mailman.1451.1360249721.2939.python-list@python.org>
On 2013-02-06 7:04 PM, "Steven D'Aprano"
<steve+comp.lang.python@pearwood.info> wrote:

>I dispute those results. I think you are mostly measuring the time to
>print the result, and I/O is quite slow.

Good call, hadn't even considered that.

>My tests show that using urlparse
>is 33% faster than using regexes, and far more understandable and
>maintainable.

Couldn't agree more about it being more maintainable and on second thought
would gladly give up a negligible performance hit for it.

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web