on 12/7/2006 10:57 AM Hasan Diwan wrote: > On 07/12/06, Dave Anderson <[EMAIL PROTECTED]> wrote: >> >> >> I feel on a different page from you. >> >> My best guess it is that >> >> def typeOfSuper(self): >> pass(subclass) >> >> is ceding its implementation to its subclasses, kind of like what an >> abstract class or interface would do >> >> but I feel my guess is wrong. Please clarify. > > No, that is spot-on.
The Implementations syntax sketch has no need for abstract classes, since concrete classes serve as the interfaces. Still, in the syntax, one could simply define a class with a bunch of empty methods, and it would be usable as an abstract class. >> The former is an example of someone writing a function whose first >> parameter is expected to be any object that is derived from >> MutableContainer (including dict), or is derived from a class that >> implements MutableContainer (including those implementing dict), or is >> derived from a class that specifically implements MutableContainer.add >> using a declaration like: >> >> class CanAdd: >> implements MutableContainer.add >> >> def add(self, key, value): > > I find you're making the whole "implements" procedure, a little too > complex. Ouch. Touché. :( Simple things simple. Complex things possible. _______________________________________________ Python-3000 mailing list [email protected] http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com
