How do I properly use Python's C API and exceptions?
问题 if I do something like >>> x = int(1,2,3,4,5) I immediately get a fatal error (one that would end program execution if it was in a pre-written script) Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: int() takes at most 2 arguments (5 given) and x remains undefined: >>> x Traceback (most recent call last): File "<stdin>", line 1, in <module> NameError: name 'x' is not defined How would I go about implementing that in Python's C API? I found some documentation