On Fri, Oct 31, 2008 at 3:55 PM, Edward K. Ream <[EMAIL PROTECTED]> wrote:
> I'm not proposing this in a vacuum. The qt plugin would have
> benefitted significantly from a formal definition of what is expected
> of wrapper classes. At present, my implementation approach is to wait
> for AttributeErrors. That isn't good enough.
You can do
class ITree:
def redraw(self):
raise NotImplemented
pass
def clear(self):
raise NotImplemented
etc.
And when staring a new subclass, copy-paste the class definition as
your template.
It's a documentation issue, mostly.IIRC the zope people were
regretting their overuse of interfaces. Interfaces look better on
paper, but in practice they are not all that handy. Apart from
statically typed languages like C++, where they are mandatory layer of
abstraction for many problems.
--
Ville M. Vainio
http://tinyurl.com/vainio
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---