错误代码门户
PythonPython错误代码

EOFError

EOFError

代码 EOFError · Python 报告的问题。

当 input() 函数遇到文件结束条件 (EOF) 且未读取任何数据时引发。 (注意:io.TextIOBase.read() 和 io.IOBase.readline() 方法在遇到 EOF 时返回空字符串。)

Google Translate · 此内容为自动翻译。技术术语及适用条件请以英文原文为准。

Raised when the input() function hits an end-of-file condition (EOF) without reading any data. (Note: the io.TextIOBase.read() and io.IOBase.readline() methods return an empty string when they hit EOF.)

故障排除与诊断链接

请先确认文档中的产品、版本及发生环境与当前情况一致。