Extend python compatibility