title: Emulate uint32_t in Python?
body: <p>I was trying to port a function from C to Python and to make it easy to debug, I'd prefer it performed the same CPU word-size limited operations so I could compare the intermediate results. In other words, I'd like something like:</p>
  
  <pre><code>a = UnsignedBoundedInt(32, 399999)
  b = UnsignedBoundedInt(32, 399999)
  print(a*b) # prints 1085410049 (159999200001 % 2**32)
  </code></pre>
  
  <p>What's the best way to achieve this so that all operations (including bitwise shifts) would work as in C?</p>