Message31002
| 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:15 | admin | link | issue1633941 messages |
| 2007年08月23日 14:51:15 | admin | create |
|