PyArg_BuildValue, how to return a PyString object?

Michael Hudson mwh at python.net
Tue Apr 2 14:19:19 EST 2002


Chris Barker <Chris.Barker at noaa.gov> writes:

> Michael Hudson wrote:
> 
> > No.  Rememebr to DECREF "O" args after calling Py_BuildValue --
> > something I'm always forgetting.
> 
> Can't you use "N" instead? That seems to have worked for me.

Oh yeah.  Thanks for that!

In my defence, I'll just claim that I only learnt the format codes
properly for PyArg_ParseTuple...

Cheers,
M.



More information about the Python-list mailing list