Python 3 compability for polyglot