Python3.14: list.index() 会引发 ValueError,带有 3.14 之前的消息
作者: KRRT7创建于 2026年9月24日更新于 2026年9月24日
#else #elif PYTHON_VERSION < 0x3e0 PyErr_Format(PyExc_ValueError, "%R is not in list", item); return NULL; #else SET_CURRENT_EXCEPTION_TYPE0_STR(tstate, PyExc_ValueError, "list.index(x): x not in list"); return NULL; #endif }
内容来源: Nuitka/Nuitka