passing PyIntType objects by reference

Patrick Stinson ajole-1 at
Thu Jun 10 12:04:42 CEST 2004

when passing an python integer value to a C function
x = 1

is it possible to change the value of the python object "x" as happens in c
when you pass a pointer to an int? Is there something fundamentally wrong
with this idea, as this does not happen in pure python anyway?

Better yet, I'm wrapping a C api where some of the values are returned by
passing values by reference. Is the only way to simulate this to return a
list with the returned values?


More information about the Python-list mailing list