我在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在哪里吗?在
非常感谢你的帮助。在
PyLong_AsUnsignedLong来自C-API Long Integer Object。它返回传递的Python对象的C unsigned Long。在
相关问题 更多 >
编程相关推荐