I would write little wrapper functions that check the pointer, and if it's NULL, return None instead of the dereferenced value.
To illustrate: object get_age(FaceObject &f) { return f.getAge() ? object(*f.getAge()) : object();} ... class_<FaceObject, boost::noncopyable>(...).add_property("age", get_age); Thus, if the pointer is initialized, the value pointed to will be returned, and if not, None. -- ...ich hab' noch einen Koffer in Berlin... _______________________________________________ Cplusplus-sig mailing list Cplusplus-sig@python.org http://mail.python.org/mailman/listinfo/cplusplus-sig