This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Aaron.Meurer
Recipients Aaron.Meurer
Date 2017-11-13.23:02:31
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1510614151.97.0.213398074469.issue32019@psf.upfronthosting.co.za>
In-reply-to
Content
Here are the steps to reproduce this:

- Compile and link Python against readline version 7.0 or higher.
- Add 

set enable-bracketed-paste on

to your ~/.inputrc

- Start python and paste the following two lines. Make sure to use a terminal emulator that supports bracketed paste (most modern ones do). You'll need to type enter after pasting the lines. 

a = 1
a


You get something like

>>> a = 1
a
  File "<stdin>", line 1
    a

    ^
SyntaxError: multiple statements found while compiling a single statement

It does work, however, if you paste something that has a newline but is a single statement, like

(1, 
2)

Fixing this in the right way might not be so easy, due to the way that compile('single') is over-engineered. A simple fix would be to disable bracketed paste in the Python shell. 

I tested this with Python 3.6.3. I was not able to get the git master to compile, so I couldn't test it there.
History
Date User Action Args
2017-11-13 23:02:32Aaron.Meurersetrecipients: + Aaron.Meurer
2017-11-13 23:02:31Aaron.Meurersetmessageid: <1510614151.97.0.213398074469.issue32019@psf.upfronthosting.co.za>
2017-11-13 23:02:31Aaron.Meurerlinkissue32019 messages
2017-11-13 23:02:31Aaron.Meurercreate