matching one time through a loop

Delaney, Timothy tdelaney at avaya.com
Thu May 30 19:32:49 EDT 2002


> From: Sean 'Shaleh' Perry [mailto:shalehperry at attbi.com]
> 
> On 30-May-2002 Delaney, Timothy wrote:
> >> From: Corey G. [mailto:ctgaff at attbi.com]
> >> 
> >> This comment made me realize just how little I know about 
> >> Python.  Well,
> >> it's only been 3 days now, but none the less.
> >> 
> >> By moving the regex out of the loop and only compiling it once, the
> >> script is 3x faster than before and now out performs my 
> original Perl
> >> script.
> > 
> > This needs to be added to the comparisons page ;)
                                                   ^^
> > 
> 
> depends, was it naive perl too?

Well, on that point, isn't all perl naive, in the sense that there is no
expectation that anyone else will read it?

Explicit <wink> for those who can't read smileys ... ;)

Tim Delaney





More information about the Python-list mailing list