Python 3 support

It just makes it pass the unit test successfully.