From: Robert Klemme Date: 2004-07-17T17:27:13+09:00 Subject: Re: Dynamically replacing methods for efficiency "Hal Fulton" schrieb im Newsbeitrag news:40F838B6.9060901@hypermetrics.com... > I have an idea here, but I'm afraid of crossing the line from > cleverness to madness. > > Imagine you have a class with methods whose behavior changes > based on various attributes. > > For example, I'll name this method "action"; suppose that in > general, it just calls do_this and do_that. > > def action > do_this > do_that > end > > But now suppose we enable things like a debug mode and a > trace mode and logging and a configurable delay and such: > Please: Express your opinions. While there were other suggestions let me point out that some future version (or was it 1.9.x?) will include hooks that can be put before, after or around a method invocation. I don't remember the exact thread but I do remember that there was quite some discussion about this - probably three months ago. Kind regards robert