2to3 used in the Shootout

Isaac Gouy igouy2 at yahoo.com
Tue Dec 23 17:21:01 EST 2008


On Dec 23, 11:51 am, bearophileH... at lycos.com wrote:
> They have translated the Python benchmarks of the Shootout site from
> Py2 to Py3 using 2to3:
>
> http://shootout.alioth.debian.org/u32/benchmark.php?test=all〈=pyt...


So please re-write those programs to remove problems created by
automatic translation and better take advantage of Python 3
functionality...


http://shootout.alioth.debian.org/u32/faq.php#play



> It shows some "performance bugs" of Python3 itself (especially
> regarding the binary-trees benchmark, that was unexpected by me), and
> two points where 2to3 may be improved, for example after the
> translation this gives error:
>          table=string.maketrans('ACBDGHK\nMNSRUTWVYacbdghkmnsrutwvy',
>                                 'TGVHCDM
> \nKNSYAAWBRTGVHCDMKNSYAAWBR')):
>
> Gives:
> TypeError: maketrans arguments must be bytes objects
>
> Bye,
> bearophile




More information about the Python-list mailing list