"peter" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
> so my problem in fact  is:
> BEFORE:
> def myfunction(a,b):
>      return (a+b)
> AFTER:
> def myfunction(a,b, op="add"):
>       if (op == "add"):
>              # some function which calls the old code for myfunction

Is this wrapping what you want?

_myfunction = myfunction
def myfunction(a,b, op='add'):
  if (op == 'add'): return _myfunction(a,b)
  # else do new stuff and return

Terry J. Reedy



-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to