Am 22.07.2011 08:59 schrieb Frank Millman:
My guess is that it is something to do with the console, but I don't know what. If I get time over the weekend I will try to get to the bottom of it.
I would guess that in the first case, python (resp. timeit.py) gets the intended code for execution: int(float('165.0')). I. e., give the string to float() and its result to int().
In the second case, however, timeit.py gets the string 'int(float("165.0"))' and evaluates it - which is a matter of sub-microseconds.
The reason for this is that the Windows "shell" removes the "" in the first case, but not the '' in the second case.
Thomas -- http://mail.python.org/mailman/listinfo/python-list