title: Using @property versus getters and setters
body: <p>What advantages does the <code>@property</code> notation hold over the classic getter+setter? In which specific cases/situations should a programmer choose to use one over the other?</p>
  <p><strong>With properties:</strong></p>
  <pre><code>class MyClass(object):
      @property
      def my_attr(self):
          return self._my_attr
  
      @my_attr.setter
      def my_attr(self, value):
          self._my_attr = value
  </code></pre>
  <p><strong>Without properties:</strong></p>
  <pre><code>class MyClass(object):
      def get_my_attr(self):
          return self._my_attr
  
      def set_my_attr(self, value):
          self._my_attr = value
  </code></pre>