Adjusted previous commit for Python 3.