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.
I didn't follow your last sentence. What about the Python Cookbook? -- http://mail.python.org/mailman/listinfo/python-list