Python 3 support (checked on Python 2.7, 3.3 and PyPy 3.2)