On 12/18/2012 5:26 AM, Marc Aymerich wrote:

I want to monkey patch a method that has lots of code so I want to
avoid copying all the original method for changing just two lines.

You omitted the most important piece of information. Can you modify the original code (or get someone else to do so) or must you leave it as is? Chris and Peter gave you answers for the former case. If the latter, you must copy and modify for the change you specified.

--
Terry Jan Reedy

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

Reply via email to