Translation to Python 3.