title: python property decorator
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/6304040/real-world-example-about-how-to-use-property-feature-in-python">Real world example about how to use property feature in python?</a>  </p>
  </blockquote>
  
  
  
  <p>I have a question about the decorator <code>@property</code> that I've seen in the following code. Could someone be kind enough to completely explain why someone would use the <code>@property</code> decorator? I know <code>@property</code> is equivalent to <code>isActive = property(isActive)</code> but what does the method property actually do to it's parameter? If I were to call the <code>isActive</code> method from the <code>InputCell</code> class what would actually happen? Thanks in advance.</p>
  
  <pre><code>class InputCell(object):
      def __init__(self, ix, iy, inputData):
          self.ix = ix
          self.iy = iy
          self.InputData = inputData
  
      @property
      def isActive(self):
          return self.InputData[self.ix][self.iy]
  </code></pre>