idioms for abstract base classes

Carlos Ribeiro cribeiro at mail.inet.com.br
Fri Apr 13 13:41:36 EDT 2001


In Delphi, there is a "abstract" keyword that can be used as syntactic 
sugar as in the example below:

class B:
   def __init__(self): abstract
   def dosomething(self): abstract

...where "abstract" will raise a "abstract method exception". Do anyone 
smells a PEP here <wink>?


(disclaimer: before someone accuses me... Python don't need any extra 
reserved word, IMHO)


Carlos Ribeiro






More information about the Python-list mailing list