works on cpython, jython and pypy