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 draghuram
Recipients
Date 2007-01-24.17:20:22
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content

I tested two kinds of inputs with iter and noiter verisons. I posted "noter" code and OP's code is the iter version.

1) For input without newline at all (line1<CTRL-D><CTRL-D><CTRL-D>) behaves same with both versions.
2) The noiter version prints "eof" with "line1\n<CTRL-D>" while the iter version requires an additional CTRL-D. This is because iter version uses read ahead which is implemented using fread() . A simple C program using fread() behaves exactly same way. 

I tested on Linux but am sure windows behaviour (as posted by  gagenellina) will have same reasons. Since the issue is with platform's stdio library, I don't think python should fix anything here. However, it may be worthwhile to mention something about this in documentation. I will open a bug for this purpose. 





History
Date User Action Args
2007-08-23 14:51:15adminlinkissue1633941 messages
2007-08-23 14:51:15admincreate