Update to Python 3 syntax