Porting to Python 3.3 and PEP8 revision