Help me dig my way out of nested scoping
Terry Reedy
tjreedy at udel.edu
Mon Apr 4 04:33:54 EDT 2005
"Brendan" <spam4bsimons at yahoo.ca> wrote in message
news:1112571347.299876.275890 at f14g2000cwb.googlegroups.com...
>F -is- in fact an iterative optimizer that minimizes A on x (B is the
> derivative of A). So yes, F will call A and B on mulitple 'x's. In
> that case, it seems the mutable object trick is the way to go. Thanks.
As long as it calls A and B in that same order, rather than A several times
and B several times, then my code, fleshed out, will probably work.
>
> I didn't follow your last sentence. What about the Python Cookbook?
It is a book that is one place to find memoizer code which allows one to
save several x,f(x) pairs at once for later reuse. But you don't seem to
need it since an optimizer should never return to the exact same x except
by accident.
Terry J. Reedy
More information about the Python-list
mailing list