Abstract Methods & Abstract Class

Terry Hancock hancock at anansispaceworks.com
Fri Oct 21 16:48:45 EDT 2005


On Thursday 20 October 2005 03:32 am, Gerald Klix wrote:
> class AbstractBase:
>     def method(self):
>         raise NotImplementedError( "abstract method 
called" )

You should also consider using an "interface" instead
of an abstract class -- they can serve much the same
purpose.

(Search for PyProtocols or Zope to follow up on that).

--
Terry Hancock ( hancock at anansispaceworks.com )
Anansi Spaceworks  http://www.anansispaceworks.com




More information about the Python-list mailing list