7stud <[EMAIL PROTECTED]> wrote: > Does deepcopy work?
It doesn't copy a function. The easiest way to make a modified copy of a function is to use the 'new' module. >>> def f(x=2): print "x=", x >>> g = new.function(f.func_code, f.func_globals, 'g', (3,), f.func_closure) >>> g() x= 3 >>> f() x= 2 -- http://mail.python.org/mailman/listinfo/python-list