STINNER Victor <victor.stin...@haypocalc.com> added the comment:

> The patch still does not handle the case where the eof indicator
> is already set when calling raw_input. My original patch does.

Correct, your example fails, but only in Python 2.7. I don't like the idea of 
always clearing errors. I prefer to reset stdin only after an error or EOF. 
Attached patch changes file.read() to clear the EOF flag if the read was 
stopped because of the EOF.

----------
Added file: http://bugs.python.org/file21949/clear_eof.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue1195>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to