ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> types-sig
types-sig
RE: [Types-sig] Re: PRE-PROPOSAL: Python Interfaces
by Barry A. Warsaw other posts by this author
Nov 24 1998 10:24PM messages near this date
Re: [Types-sig] Re: PRE-PROPOSAL: Python Interfaces | Re: [Types-sig] Re: PRE-PROPOSAL: Python Interfaces
> >>>> "TP" == Tim Peters <tim_one@[...].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.

-Barry
Thread:
Barry A. Warsaw
Barry A. Warsaw
Jim Fulton
Barry A. Warsaw
Tim Peters
Tim Peters

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved