Re: Question about timeit

2011-07-22 Thread Frank Millman
On Jul 22, 2:43 pm, Thomas Jollans wrote: > On 22/07/11 14:30, Frank Millman wrote: > > > > > > > This is what I get after modifying timeit.py as follows - > > >     if args is None: > >         args = sys.argv[1:] > > +       print(args) > > > C:\>python -m timeit int(float('165.0')) > > ["int(fl

Re: Question about timeit

2011-07-22 Thread Thomas Jollans
On 22/07/11 14:30, Frank Millman wrote: > This is what I get after modifying timeit.py as follows - > > if args is None: > args = sys.argv[1:] > + print(args) > > C:\>python -m timeit int(float('165.0')) > ["int(float('165.0'))"] > 10 loops, best of 3: 3.43 usec per loop >

Re: Question about timeit

2011-07-22 Thread Frank Millman
On Jul 22, 10:34 am, Stefan Behnel wrote: > Thomas Rachel, 22.07.2011 10:08: > > > > > > > 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 i

Re: Question about timeit

2011-07-22 Thread Stefan Behnel
Thomas Rachel, 22.07.2011 10:08: 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

Re: Question about timeit

2011-07-22 Thread Thomas Rachel
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:

Re: Question about timeit

2011-07-22 Thread Frank Millman
On Jul 22, 8:37 am, Stefan Behnel wrote: > Frank Millman, 22.07.2011 08:06: > > > > > > > I mentioned in a recent post that I noticed an inconsistency in timeit, and > > then reported that I must have made a mistake. > > > I have now identified my problem, but I don't understand it. > > > C:\Pytho

Re: Question about timeit

2011-07-21 Thread Stefan Behnel
Frank Millman, 22.07.2011 08:06: I mentioned in a recent post that I noticed an inconsistency in timeit, and then reported that I must have made a mistake. I have now identified my problem, but I don't understand it. C:\Python32\Lib>timeit.py "int(float('165.0'))" 10 loops, best of 3: 3.52

Question about timeit

2011-07-21 Thread Frank Millman
Hi all I mentioned in a recent post that I noticed an inconsistency in timeit, and then reported that I must have made a mistake. I have now identified my problem, but I don't understand it. C:\Python32\Lib>timeit.py "int(float('165.0'))" 10 loops, best of 3: 3.52 usec per loop C:\Python