title: How does IPython's magic %paste work?
body: <p>I want to copy already indented Python code / whole functions and classes into IPython. Everytime I try the indentation is screwed up and I get following error message:</p>
  
  <p><code>IndentationError: unindent does not match any outer indentation level (&lt;ipython-input-23-354f8c8be51b&gt;, line 12)</code></p>
  
  <p><code>If you want to paste code into IPython, try the %paste and %cpaste magic functions.</code></p>