WHUI! (was Re: [Python-Dev] Proposal: C API Macro to decrefand set to NULL) (original) (raw)

Raymond Hettinger python at rcn.com
Thu Jul 15 15:17:48 CEST 2004


Almost all tptraverse implementations can (and should) look exactly alike:

PyVISIT(member1); PyVISIT(member2); ... PyVISIT(membern); return 0;

It does get a little more complicated for containers that loop over their contents and possibly have other PyObject * fields also.

Still, I applied the macro to collections and itertools and found it to be straight-forward and easy to use.

Raymond



More information about the Python-Dev mailing list