Re: adding class functionality, nested scoping

2008-01-04 Thread Arnaud Delobelle
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_

adding class functionality, nested scoping

2008-01-04 Thread jholg
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):