On Mon, 2007-04-09 at 23:35 -0700, 7stud wrote: > 2) When returning None, why use the idiom: > > Py_INCREF(Py_None); > return Py_None; > > instead of: > > return Py_BuildValue(""); >
As Gabriel said, the preferred idiom is faster and clearer. Sufficiently recent Pythons define the macro Py_RETURN_NONE for the preferred idiom. -Carsten -- http://mail.python.org/mailman/listinfo/python-list