Q: The C idea of (pv != NULL) is said most directly in Python ctypes
how?

A: We are of course supposed to write something like:

        def c_not_null(pv):
                return (ctypes.cast(pv, ctypes.c_void_p).value != None)

Yes?

Working from the doc, me the clueless newbie, I was slow to guess such
relevant truths as:

ctypes.c_void_p(0).value == None
ctypes.c_void_p(0) != ctypes.c_void_p(0)

Curiously yours, thanks in advance, Pat LaVarre

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to