Compatibility for Python 3