Compatibility with Python 3