Hello, Here is some pseudo-code that hopefully illustrates what I want to do:
records = list(...) for record in records: new_fcn = define_a function_for(record) instance = my_new_class_instance() setattr(instance, 'myfcn', new_fcn) instance.execute() # instance.execute() calls instance.myfcn(*args) I have looked at some of the functions in the *new* module and new.code(...), new.function(...), and new.instancemethod(...) appear to do what I want, but I do not know how to use new.code() and new.function() -- specifically what its *global* parameter should be. I was not able to find helpful information using Google. Thanks for any suggestions on how to approach this. -- jv -- http://mail.python.org/mailman/listinfo/python-list