Looks promising. The new coding pasting could be a huge quality of life improvement. I hate having to create temporary files or fiddling about with `if __name__ == '__main__'` just to test something in isolation real quick.
Adding that function to a $PYTHONSTARTUP file will make it available automatically every time you launch the REPL.
It's definitely a hack, but it's a pretty decent workaround for now. I'll likely continue to use it even after the new REPL launches because the textwrap.dedent call will auto-unindent indented code (when pasting from a markdown or reStructuredText file for example).