because Hindley-Milner rocks
I patted myself on the back way too soon to be proud. If you look back to the first post and know a little about Swig you might see why. If you don’t, let me explain.
Swig doesn’t create a valid constructor for abstract C++ classes when it wraps them. Thus when I was enclosing my calls in Python’s try–catch clauses the real exception I was catching was an AttributeError “constructor not defined.” That error was thrown by the seemingly innocuous line Foo.__init__(self). Changing the C++ code so that Foo was not an abstract class solved the problem… for that code at least.
Thing is, we need to wrap an abstract class. All functions are pure and virtual. Swig includes a %noabstract instruction but very little guidance as to how it interacts with directors and cross-language polymorphism. Looks like first thing I’ll do tomorrow is make a new SO post.