Fixing errors in the python encapsulation post