Re: dynamic metaclass overwrites custom methods
[email protected] Tue, 07 Sep 2004 13:02:18 +1200
| Newsgroups | gmane.comp.python.modeling |
|---|---|
| Message-ID | <[email protected]> |
On 02 Sep 2004 20:42:44 +0200 Sebastien Bigaret <[email protected]> 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 ------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click