pybind: Some fixes on semantics

Nice fix! It'd be great to add a test for this case to src/test/pybind/test_rados.py too