提问人:user48206 提问时间:11/23/2016 更新时间:11/23/2016 访问量:235
为什么 Python3.2 需要 3 个 ctrl+D 才能退出,而 Python3.3 只需要 2 个?
Why does Python3.2 require 3 ctrl+D to exit, but Python3.3 only 2?
问:
运行以下脚本:
import sys
sys.stdout.write(sys.stdin.read())
然后输入:
a<ctrl-d><ctrl-d><ctrl-d>
在 Python 2.6、2.7、3.3、3.4、3.5 中,程序将在 2 后终止,但在 Python 3.1 和 3.2 中,它需要 3。<ctrl-d>
关于为什么会这样,有什么线索吗?
答: 暂无答案
评论