title: Temporarily override locale with a context manager
body: <p>Is there a way to temporarily activate a locale within the scope of a block of code? Basically, I want to do something like this:</p>
  
  <pre><code>locale.setlocale(locale.LC_NUMERIC, 'nl_BE.utf8')
  </code></pre>
  
  <p>Like this:</p>
  
  <pre><code>with override_locale(locale.LC_NUMERIC, 'nl_BE.utf8'):
     # Stuff here
  </code></pre>
  
  <p>That way I can also avoid any thread safety issues that may arise when using <code>setlocale</code>. My use case is parsing an uploaded file where the decimals use a comma instead of a period as the decimal separator (e.g. 1,25 instead of 1.25).</p>