最佳答案
我想把已经缩进的 Python 代码/整个函数和类复制到 IPython 中。每次我尝试的缩进是搞砸了,我得到以下错误消息:
IndentationError: unindent does not match any outer indentation level (<ipython-input-23-354f8c8be51b>, line 12)
If you want to paste code into IPython, try the %paste and %cpaste magic functions.