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 cben
Recipients cben
Date 2010-08-15.22:52:07
SpamBayes Score 5.7913643e-05
Marked as misclassified No
Message-id <>
[Spinoff of]

If you manage to type several simple statements into the prompt (by copy-pasting them, using Ctrl+J, or creative deletion), IDLE runs the first one and silently ignores the rest:

>>> x = 1
x = 2
>>> x

Moreover, it doesn't even parse the additional lines:

>>> x = 3
$@syntax error?!
>>> x

If the first statement is a compound statement, IDLE refuses with a SyntaxError at the begging of the second statement:

>>> def f():
	return 42
SyntaxError: invalid syntax

I believe in both cases the right least-surprise behavior is to run all statements.

If not, a clear error explaining that IDLE doesn't support multiple statements must be printed.  But I can't see a reason to choose this over making it Just Work.

[Implementation: might or might not be related to]
Date User Action Args
2010-08-15 22:52:10cbensetrecipients: + cben
2010-08-15 22:52:10cbensetmessageid: <>
2010-08-15 22:52:07cbenlinkissue9618 messages
2010-08-15 22:52:07cbencreate