>>79をもう少しましにやるとすれば・・・

from exceptions import NotImplementedError

class AbstractDisplay:
  def prefix( self ): raise NotImplementedError
  def suffix( self ): raise NotImplementedError
  def stem( self ): raise NotImplementedError
  def display( self ):
    print self.prefix() + self.stem()*5 + self.suffix()

class CharDisplay(AbstractDisplay):
  def __init__( self, char ):
    self.__char = char
  def prefix( self ): return '<<'
  def suffix( self ): return '>>'
  def stem( self ): return self.__char