- Original Message -
> From: Dave Angel
> To: tutor@python.org
> Cc:
> Sent: Tuesday, February 17, 2015 11:50 PM
> Subject: Re: [Tutor] monkey patching question
>
> On 02/17/2015 04:53 PM, Albert-Jan Roskam wrote:
>> Hi,
>>
>> I would like t
Apologies, but the answer might be unsatisfactory. The syntactic use
of decorators is confusing the situation. Let's simplify. Your
question is equivalent to the following scenario:
def logged(g):
def wrapped(x):
print "call"
return g(x)
On 02/17/2015 04:53 PM, Albert-Jan Roskam wrote:
Hi,
I would like to monkey patch a function 'decode' that is defined inside a class. It is
defined there because it is a logical place, next to its counterpart *method* 'encode'. I
can successfully monkey patch meth1, but when I call meth2, it d