['(map(lambda xx * range( )))'['list( * for in range( ))'[" 'spam \nx [ [ifor in range( )]"[" '?'\nfor in range( ) +'?'"the following shows this script' output when run to test multiple python versions for each statement string in this mode the script itself is run by python but it launches shell command lines that start other pythons to run the timeit module on the test statement strings this mode must splitformatand quote multiline statements for use in command lines according to timeit expectations and shell requirements this mode also relies on the - python command-line flag to locate timeit on the module search path and run it as scriptand the os popen and sys argv standard library tools to run shell command and inspect command-line argumentsrespectively see python manuals and other sources for more on these callsos popen is also mentioned briefly in the files coverage of and demonstrated in the loops coverage in run with - flag to watch the command lines runc:\codepy - pybench_cases py - ( :bd afb ebf sep : : [msc bit (amd )['[ * for in range( )]' :\python \python loopsbest of usec per loop :\python \python loopsbest of usec per loop :\pypy\pypy- \pypy loopsbest of usec per loop ['res=[]\nfor in range( )res append( * )' :\python \python loopsbest of usec per loop :\python \python loopsbest of usec per loop :\pypy\pypy- \pypy loopsbest of usec per loop ['$listif (map(lambda xx * range( )))' :\python \python loopsbest of usec per loop :\python \python loopsbest of usec per loop :\pypy\pypy- \pypy loopsbest of usec per loop ['list( * for in range( ))' :\python \python loopsbest of usec per loop :\python \python loopsbest of usec per loop :\pypy\pypy- \pypy loopsbest of usec per loop [" 'spam \nx [ [ifor in range( )]" the benchmarking interlude