On Jan 4, 10:43 am, [EMAIL PROTECTED] wrote:
> Hi,
Hi
[...]
> # Does not work: all enhanced methods only call the last wrapped originial
> # method. It seems the name 'method' in the surrounding scope of the
> # def _(...) function definition only refers to the last loop value(?)
> def ERRONEOUS_
Hi,
regarding automatically adding functionality to a class (basically taken
from the cookbook recipee) and Python's lexical nested scoping I have a
question wrt this code:
#-
import types
# minor variation on cookbook recipee
def enhance_method(cls, methodname, replacement):