[issue43379] Pasting multiple lines in the REPL is broken since 3.9

Ned Deily report at bugs.python.org
Wed Mar 3 22:08:58 EST 2021


Ned Deily <nad at python.org> added the comment:

Sorry, I cannot reproduce that behavior. The output you show isn't what I would expect, in any case.

$ python3.8
Python 3.8.7 (v3.8.7:6503f05dd5, Dec 21 2020, 12:45:15)
[Clang 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> def f():
...     print("hello world")
...
>>> ^D
$ python3.9
Python 3.9.1 (v3.9.1:1e5d33e9b9, Dec  7 2020, 12:44:01)
[Clang 12.0.0 (clang-1200.0.32.27)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> def f():
...     print("hello world")
...
>>> ^D

Note the missing '...' continuation prompts.  So can you verify that the text when you paste it includes just a standard linefeed (LF) control character as the end-of-line delimiter?  Other possible differences might be whether the python in use was linked with the BSD libedit library or with GNU readline but that shouldn't make a difference unless you have some non-default options in their configuration files.  You can check which one is in use with this:

$ python3.8 -c "import readline;print(readline.__doc__)"
Importing this module enables command line editing using GNU readline.
$ python3.9 -c "import readline;print(readline.__doc__)"
Importing this module enables command line editing using libedit readline.

If all else fails, from where did you obtain the pythons that you are using?  And in what environment are you running those commands, i.e. the macOS Terminal.app?

----------
nosy: +ned.deily

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43379>
_______________________________________


More information about the Python-bugs-list mailing list