title: Value never below zero
body: <p>Is it possible to assign a numeric value to a variable in such a way that it is limited to a certain range? More specifically I want a variable that can never go below zero, because if that was about to happen an exception would be raised.</p>
  
  <p>Imaginary example:</p>
  
  <pre><code>&gt;&gt;&gt; var = AlwaysPositive(0)
  &gt;&gt;&gt; print var 
  0
  &gt;&gt;&gt; var += 3
  &gt;&gt;&gt; print var 
  3
  &gt;&gt;&gt; var -= 4 
  Traceback (most recent call last):   
     File "&lt;stdin&gt;", line 1, in &lt;module&gt; 
  AlwaysPositiveError: dropping AlwaysPositive integer below zero
  </code></pre>
  
  <p>The reason I ask is because I am debugging a game I am writing. Where humans understand implicitly you can never have <code>-1</code> cards in your hand, a computer does not. I can make functions that check all values used in the game and call those functions at multiple positions throughout the script and see if any weird values appear. But I was wondering if there perhaps was an easier way to do this?</p>