title: Cannot access member variable using abc module and properties in python
body: <p>I wrote a code that simulates the use of <code>abc</code> module and <code>properties</code>. However, it seems that I couldn't be able to access <code>width</code> and <code>height</code> variables. The code is as the following:</p>
  
  <pre><code>from abc import ABCMeta, abstractmethod
  
  class Polygon:
  
  __metaclass__ = ABCMeta
  
  @abstractmethod
  def compute_area(self): pass
  
  
  def __init__(self):
      self.width = None
      self.height = None
  
  @property
  def width_prop(self):
      return self.width
  
  @property
  def height_prop(self):
      return self.height
  
  @width_setter.setter
  def width_setter(self, width):
      self.width = width
  
  @height_setter.setter
  def height_setter(self, height):
      self.height = height
  
  
  
  class Triangle(Polygon):
      def compute_area(self):
          return 0.5 * width * height
  
  
  
  
  if __name__ == "__main__":
      tri = Triangle()
      tri.height_setter(20)
      tri.width_setter(30)
      print "Area of the triangle = ", tri.compute_area()
  </code></pre>
  
  <p>The error message that I obtained is <code>NameError: name 'width_setter' is not defined</code>. What could be wrong in my implementation?</p>
  
  <p>EDIT:</p>
  
  <pre><code>from abc import ABCMeta, abstractmethod
  
  class Polygon:
  
  __metaclass__ = ABCMeta
  
  @abstractmethod
  def compute_area(self): pass
  
  
  def __init__(self):
      self.width = None
      self.height = None
  
  @property
  def width_prop(self):
      return self.width
  
  @width_prop.setter
  def width_setter(self, width):
      self.width = width
  
  @property
  def height_prop(self):
      return self.height
  
  @height_prop.setter
  def height_setter(self, height):
      self.height = height
  
  
  
  class Triangle(Polygon):
      def compute_area(self):
          return 0.5 * self.width * self.height
  
  
  
  
  if __name__ == "__main__":
      tri = Triangle()
      tri.height_prop = 20
      tri.width_prop = 30
      print "Area of the triangle = ", tri.compute_area()
  </code></pre>