title: Is Python variable assignment atomic?
body: <p>Let's say I am using a <code>signal</code> handler for handling an interval timer.</p>
  
  <pre><code>def _aHandler(signum, _):
    global SomeGlobalVariable
    SomeGlobalVariable=True
  </code></pre>
  
  <p>Can I set <code>SomeGlobalVariable</code> without worrying that, in an unlikely scenario that whilst setting <code>SomeGlobalVariable</code> (i.e. the Python VM was executing bytecode to set the variable), that the assignment within the signal handler will break something? (i.e. <em>meta-stable</em> state)</p>
  
  <p><strong>Update</strong>: I am specifically interested in the case where a "compound assignment" is made outside of the handler.</p>
  
  <p>(maybe I am thinking too "low level" and this is all taken care of in Python... coming from an Embedded Systems background, I have these sorts of impulses from time to time)</p>