function return -> input parameter

Benjamin Tai bt98 at doc.ic.ac.uk
Tue Nov 20 13:36:32 EST 2001


Hi,

Sorry for the confusion. I will try to explain it a bit clearer.

I am trying to extend the following program, written in C, into Python.



Alphabet A, B, C, D;

//passing an Alphabet type to the 2nd argument
setNext( A, B );

//calling a function, returning Alphabet type to the 2nd argument
setNext( A, getPrev(C) );

//doing a recursive function call, returning Alphabet type to the 2nd
argument
setNext( A, getPrev(getPrev(D)) );




The mian problem is:
1) How can I extend the above C function into Python using Python/C API?
These three function calls will achieve the same result, but the control
flow behind the Python/C API is very different.

Any help or comment would be appreciated

Ben




More information about the Python-list mailing list