Run the following script:
import sys
sys.stdout.write(sys.stdin.read())
Then type:
a<ctrl-d><ctrl-d><ctrl-d>
In Python 2.6, 2.7, 3.3, 3.4, 3.5, the program will terminate after just 2 <ctrl-d>
, but in Python 3.1 and 3.2, it takes 3.
Any clues as to why this is?