Hi
I am writing some C code which sets and retrieves a Python exception. I
set the exception using PyErr_SetString(), and retrieve it in 2 ways: 1)
using PyErr_Occurred() and 2) Using sys.exc_type. However, I get two
different results and am very puzzled by this apparent inconsistency.
Could
Hi
Here's a simple class example I've defined
#
class myInt(int):
def __add__(self,other):
return 0
print 5 + myInt(4) #prints 9
print myInt(4) + 5 #prints 0
#
The Python binary operation function (binary_op1() in
Objects/a