poof65 wrote: > An idea, i don't know if it will work in your case. > > for x in xrange(10): > funcs.append(lambda p,z=x: testfunc(z+2,p))
Good idea. I will try it. I also figured out a way to architecture my program differently to avoid this problem. But this idiom might be handy in certain situations. Suppose you need to provide a callback function with a fixed signature to some library routine. But you want to add extra contextual data to your callback. This just might be the ticket. Michael -- http://mail.python.org/mailman/listinfo/python-list