"implemented by subclass"

phil hunt philh at comuno.freeserve.co.uk
Sat Feb 16 13:32:14 EST 2002


Consider the following python code:


class Log:
   def write(self, text): 
      """(implemented by subclass)"""  


Is this the most pythonic way to do it? If not, what would be
better? How about rasing a ShouldBeImplementedBySublass exception?

How do other people do it?

-- 
===== Philip Hunt ===== philh at comuno.freeserve.co.uk =====
Herbivore, a zero-effort email encryption system. Details at:
<http://www.vision25.demon.co.uk/oss/herbivore/intro.html>






More information about the Python-list mailing list