[Types-sig] Re: PRE-PROPOSAL: Python Interfaces

Barry A. Warsaw bwarsaw@cnri.reston.va.us (Barry A. Warsaw)
Tue, 24 Nov 1998 19:24:41 -0500 (EST)

>>>>> "TP" == Tim Peters <tim_one@email.msn.com> writes:

    TP> As we discussed on the egroups version of this, if interfaces
    TP> allow supplying impementation, then

    |     from InterfaceSupport import deferred
    |     class Stack(Interface):
    |         def push(self, thing): deferred()
    |         etc

    TP> would make everyone who *claims* to implement Stack pick up
    TP> the (presumably error-raising) Stack.push "deferred()"
    TP> implementation if they don't supply their own (or inherit some
    TP> other) real implementation of push.

That definitely does the trick, assuming we add something like a
NotImplementedError to the core and perhaps even a builtin function
deferred() that just raises the exception.  Half of me wants something 
a little more magical (and thus less dependent on the author to play
the right game)... okay make that 1/4 of me.. no 1/8... urg.