pybind: Some fixes on semantics

I've added a simple test .https://github.com/salehe/ceph/commit/f30e499fbeaba7e73adc477c58b406a0d5c18b33