Performance on local constants?

Matthew Franz mdfranz at gmail.com
Thu Dec 27 17:04:01 EST 2007


Thanks, that makes more sense. I got tripped up by the function
returning a function thing and (for a while) thought _ was some sort
of spooky special variable.

- mdf

> On Dec 28, 7:53 am, "Matthew Franz" <mdfr... at gmail.com> wrote:
> > I get class Searcher(object) but can't for the life of me see why
> > (except to be intentionally obtuse) one would use the def
> > searcher(rex) pattern which I assure you would call with
> > searcher(r)(t) right?
> >
>
> The whole point of the thread was performance across multiple searches
> for the one pattern. Thus one would NOT do
>     searcher(r)(t)
> each time a search was required; one would do
>     s = searcher(r)
> ONCE, and then do
>     s(t)
> each time ...
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
Matthew Franz
http://www.threatmind.net/



More information about the Python-list mailing list