错误代码门户
PythonPython错误代码

IndexError

IndexError

代码 IndexError · Python 报告的问题。

当序列下标超出范围时引发。 (切片索引会被静默截断以落在允许的范围内;如果索引不是整数,则会引发 TypeError。)

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

Raised when a sequence subscript is out of range. (Slice indices are silently truncated to fall in the allowed range; if an index is not an integer, TypeError is raised.)

故障排除与诊断链接

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