Python 3 compatibility by 2to3