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 terry.reedy
Recipients Davide Okami, kbk, roger.serwy, terry.reedy
Date 2015-03-09.20:01:31
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1425931291.8.0.113152471616.issue23616@psf.upfronthosting.co.za>
In-reply-to
Content
I believe you are reporting the following behavior, which I believe I have seen before but which seems not to be the subject of a tracker issue.  If I run

import time
for i in range(20):
	print(i)
	time.sleep(.5)

either in Shell at >>> or from the editor, and hold Undo (^Z for me on Windows), output is deleted back to the previous >>>.  When the statements are enter in Shell, that means erasing the visible 'for' statement.  A bit to my surprise, <<Prev>> (alt-P for me) still reloads the 'for' statement.

While this behavior is entirely avoidable by users (don't hit Undo after Enter), I agree that it is not desirable.  At minimum, it should be possible to clear the undo buffer when code is submitted for execution, just as it is when >>> is printed.  That should prevent removal of the entered statement.

I believe Undo is left active during execution so it will be active during user entry in response to input('prompt').  Also, one can start entering input before 'prompt' is printed. So avoiding adding output to Undo would be trickier.

--
Please don't fiddle with the Versions: settings.  This is not a security issue, any change will be applied to 3.5.
History
Date User Action Args
2015-03-09 20:01:31terry.reedysetrecipients: + terry.reedy, kbk, roger.serwy, Davide Okami
2015-03-09 20:01:31terry.reedysetmessageid: <1425931291.8.0.113152471616.issue23616@psf.upfronthosting.co.za>
2015-03-09 20:01:31terry.reedylinkissue23616 messages
2015-03-09 20:01:31terry.reedycreate