WHUI! (was Re: [Python-Dev] Proposal: C API Macro to decref andset to NULL)

Jeremy Hylton jeremy at alum.mit.edu
Tue Jul 13 17:24:55 CEST 2004

> I still don't like it, because it hides the return.

It should be used in the core, but you don't have to use it in your own

> I'd rather do:
>	if (self->foo != NULL && (vret = visit(self->foo, arg)))
>		return vret;

This violates the Python C style by putting an assignment in a conditional.
You'd need to put the assignment to vret inside the body of an if statement.
In other words, it would look just like the expansion of the VISIT() macro.


More information about the Python-Dev mailing list