Python assert语句触发系统错误:\loewis\release\Python\Objects\longobject.c:270:内部函数的参数错误

2024-05-07 07:48:31 发布

您现在位置:Python中文网/ 问答频道 /正文

我在Python中有一个assert语句,它触发以下异常:

SystemError: \loewis\release\python\Objects\longobject.c:270: bad argument to internal function

我在Python代码中搜索我使用的版本(2.4.2),可以看到这个错误来自longobject.c中的以下函数:

^{pr2}$

现在我在Python的源代码中搜索了这个函数,但是我无法在这个函数和Python assert语句之间建立链接。在

你知道调用Python assert语句时调用PyLong_AsUnsignedLong在哪里吗?在

非常感谢你的帮助。在


Tags: to函数代码版本releaseobjectsfunctionassert