title: What is the proper way to trigger an action after value assignment in Python?
body: <p>I want to create an int type with boundaries like:</p>
  
  <p><code>&gt; a = BoundInt(2,4)</code></p>
  
  <p><code>a</code> will only hold values 2, 3 or 4 and raise an error if a different value is assigned to it.</p>
  
  <p>But since Python doesn't let me override assignment and using setters is no Pythonic I'm kind of lost. </p>
  
  <p>How could I work this out in my class and what specific syntax would this require when assigning new values to my vars?</p>