vava...@cpu111.math.uwaterloo.ca (Stephen Vavasis) writes: > If x is a C variable of type PyObject*, and I happen to know already > that the object is of a numeric type, say int, is there a way to > change the value of x in place to a different number? In the C/API > documentation I found routines to increment or decrement it in > place, but I didn't find a routine to simply replace its value by a > different value.
The only thing you can do is change x to point to a different object, with the new desired value. That is how the "in place" number modification functions work. Which routines to increment or decrement the number are you referring to, exactly? -- http://mail.python.org/mailman/listinfo/python-list