Thanks for the responses. I'm well aware that the function can be passed in the parameters, passing in the functino as an arg defeats the purpose of what I'm going after.
@ Arnaud - Nice. I'm not sure what the performance of mine vs. yours, but a perfunctory glance looks like we're doing the close to the same thing. Maybe one advanage to doing it wrap(x).foo().... is that you can pass in other parameters to foo. Of course, getting the callers locals/globals is bad in of itself. best, dave -- http://mail.python.org/mailman/listinfo/python-list