On Fri, Oct 31, 2008 at 9:03 AM, Ville M. Vainio <[EMAIL PROTECTED]> wrote:
> You can do > > class ITree: > > def redraw(self): > raise NotImplemented > pass > def clear(self): > raise NotImplemented Leo's present design pattern is to call self.oops() instead of raising an exception. oops calls g.trace(g.callers()) to show where the reference was. This has worked well: the qt gui initially showed 'oops' messages and moved on. > And when staring a new subclass, copy-paste the class definition as > your template. That's what I did for the qt plugin. But this was a bit too "cowboy" for my liking. The point of the present refactoring work is to get more confidence than copy/paste provides. There are too many ways to blunder... OTOH, pylint is quite helpful too. In short, I am going to experiment to see how useful this all is. I think there is less disagreement between us than meets the eye. > It's a documentation issue, mostly.IIRC the zope people were > regretting their overuse of interfaces. Thanks for this comment. It's useful to be aware of the down sides of what looks to be a purely good idea. Leo is at the extreme other end of the spectrum at present :-) Edward --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "leo-editor" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en -~----------~----~----~----~------~----~------~--~---
