Re: [Modeling-users] dynamic metaclass overwrites custom methods
Status: Abandoned
Brought to you by:
sbigaret
From: <no...@ti...> - 2004-09-07 01:06:49
|
On 02 Sep 2004 20:42:44 +0200 Sebastien Bigaret <sbi...@us...> wrote: > That should be handled, you're absolutely right. However, I would > suggest to make a 'warning' instead, and to overwrite the already > defined method m() with a new one calling simply self.willChange() > before calling m() --and the same for getAttribute()() but w/ > self.willRead() instead. Letting the framework call willChange/willRead *before* calling my biz logic sounds elegant but takes the freedom to define if/when to call them away, plus I like not to write code that addresses "_AttrName" internal attributes directly and prefer to let the framework generated methods do it. On top of that it makes code generation a little bit more complex for no clear (? to me ?) advantage, I'd stick to the simple solution :) what do you think? -- Delio |