Please read over this
before posting again. The primary points (though you should still read it) are: always post code and tracebacks unless there's a really, really good reason not to, and use code tags when you do. And real code is preferable to pseudo-code nearly always as well, especially since Python is often close anyway, providing the abstractions that pseudo-code usually provides while being much more concrete.
Without the code it's somewhat difficult to say what the ideal solution is. When you ask about passing a function call around, here are the two thoughts that come my mind.
- Code: Select all
>>> def f(x, y):
return x + 2*y
>>> >>> def g(wrapped_call):
>>> g(lambda: f(1, 2))
>>> def g(function, args):
>>> print g(f, (1, 2))
The first creates a (lambda) function which will make the call I want, and the second passes the function and desired parameters which can then be combined later. They're functionally equivalent.
krazygluon wrote:I apologize for wretched language but my programming jargon is worse than my actual programming ability (self-taught)
Even more reason to post code
Most if not all of us here are self-taught, and we've all been where you are, not knowing the jargon yet and having some goal in mind, wanting help, and not being 100% efficient at communicating those desires. But you're in the right place to learn all those things