mirror of
https://github.com/python/cpython.git
synced 2025-10-21 06:02:21 +00:00
gh-111201: Speed up paste mode in the REPL (#119341)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
This commit is contained in:
parent
cd516cd1f5
commit
e6572e8f98
6 changed files with 21 additions and 16 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue