Menu

Farewell PyCXX

Well, I was wrong; PyCXX isn't worth it after all. While I was working with PyCXX, I've came to realize that the major difficulty with direct use of the Python API is mainly correct ref-counting, particularly in the face of error conditions.

Having implemented a py_handle<> class template to take care of that, the rest of the PyCXX Object API suddenly seemed like a lot of syntactic sugar; a fairly superficial mapping of the API to C++-style object tree. Nice if you're not familiar with the Python API, but I am. I think it will be no more difficult to just use that, now that ref-counting is automated.

As for the PyCXX Extensions API, I'd hardly even touched that. I can see that as of now it doesn't do a whole lot of things I'm going to want to do, and what it does do it does in a rather antique way dating back to Python 1.5.2. Bringing it up to the post-Python 2.2 state of the art in type extension is going to be a very significant project all by itself. I flat-out underestimated the scope of the changes I would have to make.

So, farewell PyCXX. It's now banished from trunk and relegated back to its own vendor branch; I'll decide what to do with the incomplete refactoring work later. Probably I'll finish what I was doing with the Object API and hand it over to the PyCXX project to do with what they will.

Posted by Kevin J Bluck 2006-11-21

Log in to post a comment.