title: Is it safe to modify the output of globals()?
body: <p>The <a href="https://docs.python.org/2/library/functions.html#locals" rel="noreferrer">documentation for the locals() function</a> specifically warns not to modify its output, as interpreters may not reflect changes in the local scope. I'm assuming that means the Python spec doesn't require it, even though it works in CPython.</p>
  
  <p>I'd like to know if this is the same for globals(). There's no warning in <a href="https://docs.python.org/2/library/functions.html#globals" rel="noreferrer">the documentation</a>, but I find it strange that this would differ as each function apparently performs the same action on a different scope.</p>
  
  <p>If it's safe, modifying globals()' output would improve the simplicity and compatibility of a project I'm working on.</p>