Sturla Molden wrote:
The way I see it, "object" is a Python type and "PyObject*" is a C type. That is, PyObject* is just a raw C pointer with respect to behavior.

Well... while it's possible to declare something as PyObject*
in Cython and get raw pointer behaviour, it's something you
should only do in very rare circumstances, because you're
then totally on your own when it comes to reference counting
and exception handling.

If you're suggesting that 'def object foo' should give Python
reference semantics and 'cdef object foo' raw C pointer
semantics, that would lead to a world of pain.

--
Greg
_______________________________________________
cython-devel mailing list
cython-devel@python.org
http://mail.python.org/mailman/listinfo/cython-devel

Reply via email to