mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
gh-111201: Allow pasted code to contain multiple statements in the REPL (#118712)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
This commit is contained in:
parent
26bab423fb
commit
a94ac56628
6 changed files with 33 additions and 9 deletions
|
@ -298,10 +298,11 @@ class _ReadlineWrapper:
|
|||
reader.more_lines = more_lines
|
||||
reader.ps1 = reader.ps2 = ps1
|
||||
reader.ps3 = reader.ps4 = ps2
|
||||
return reader.readline()
|
||||
return reader.readline(), reader.was_paste_mode_activated
|
||||
finally:
|
||||
reader.more_lines = saved
|
||||
reader.paste_mode = False
|
||||
reader.was_paste_mode_activated = False
|
||||
|
||||
def parse_and_bind(self, string: str) -> None:
|
||||
pass # XXX we don't support parsing GNU-readline-style init files
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue