diff options
author | Pablo Galindo Salgado <Pablogsal@gmail.com> | 2024-05-22 01:28:32 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-22 07:28:32 +0200 |
commit | e6572e8f98d33994d2d0dd3afa92a2a72ee642a9 (patch) | |
tree | a37b8588fde40dbd36c74743de1625cd6c13a467 /Lib/_pyrepl/simple_interact.py | |
parent | cd516cd1f5e94dba887353f421513fd172efadf3 (diff) | |
download | cpython-e6572e8f98d33994d2d0dd3afa92a2a72ee642a9.tar.gz cpython-e6572e8f98d33994d2d0dd3afa92a2a72ee642a9.zip |
gh-111201: Speed up paste mode in the REPL (#119341)
Co-authored-by: Ćukasz Langa <lukasz@langa.pl>
Diffstat (limited to 'Lib/_pyrepl/simple_interact.py')
-rw-r--r-- | Lib/_pyrepl/simple_interact.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/_pyrepl/simple_interact.py b/Lib/_pyrepl/simple_interact.py index d65b6d0d627..8ab4dab7576 100644 --- a/Lib/_pyrepl/simple_interact.py +++ b/Lib/_pyrepl/simple_interact.py @@ -62,6 +62,7 @@ REPL_COMMANDS = { "quit": _sitebuiltins.Quitter('quit' ,''), "copyright": _sitebuiltins._Printer('copyright', sys.copyright), "help": "help", + "clear": "clear_screen", } class InteractiveColoredConsole(code.InteractiveConsole): @@ -163,7 +164,7 @@ def run_multiline_interactive_console( ps1 = getattr(sys, "ps1", ">>> ") ps2 = getattr(sys, "ps2", "... ") try: - statement, contains_pasted_code = multiline_input(more_lines, ps1, ps2) + statement = multiline_input(more_lines, ps1, ps2) except EOFError: break |