title: Python assert on property set
body: <p>Is it possible to make a property assert when it is changed (for the purpose of debugging)?</p>
  
  <pre><code>class MyClass(object):
      def set_my_property(self, value):
          self.my_property = value
          # TODO: mark my_property so that if it gets set again, an assert
          # is triggered
  
  c = MyClass()
  c.set_my_property(4)
  
  # any of these lines would cause an assertion
  c.set_my_property(8)
  c.my_property = 123
  </code></pre>