◐ Shell
clean mode source ↗

Message 254167 - Python tracker

In #9618, it was pointed out that IDLE Shell inherits from code.InteractiveConsole, and that #7741 proposes to allow multiple statements there.

In 3.5, this example from msg114561 now gives a SyntaxError, as it should.

>>> x = 3
	y = 7

Seven years after opening this, I am more appreciative of 'enter and execute (and recall)' one statement at a time, especially for beginners.  Ditto for being able to edit a paste before executing.  So I am more inclined to just add the note to the doc (which currently says nothing about executing anyway).

Someone who wants to paste, execute, and recall multiple statements as a block, without having output interleaved, can wrap with 'if 1:'.

>>> if 1:
	1+2
	3+4
	
3
7