Ensure compatibility with Python