Re: timeit's environment

2005-12-05 Thread Scott David Daniels
[EMAIL PROTECTED] wrote: > Scott David Daniels wrote: ... >> Perhaps you could write a paragraph or two that would have >> informed you and send it to the destination mentioned on the >> documentation page. > > Yes, but I was hoping to get some sense of how such > a submission might be viewed prio

Re: timeit's environment

2005-12-05 Thread rurpy
Scott David Daniels wrote: > [EMAIL PROTECTED] wrote: > > > Since I've been bitching about documentation in another > > thread, I'm curious... Would it be obvious to anyone of > > low to intermediate python skills that using global would > > not work in this case? Would it be obvious that using

Re: timeit's environment

2005-12-05 Thread Scott David Daniels
[EMAIL PROTECTED] wrote: > Since I've been bitching about documentation in another > thread, I'm curious... Would it be obvious to anyone of > low to intermediate python skills that using global would > not work in this case? Would it be obvious that using an > import is the answer? Or can I bl

Re: timeit's environment

2005-12-04 Thread rurpy
Alex Martelli wrote: > <[EMAIL PROTECTED]> wrote: > > > Why doesn't the following work? It generates a "NameError: global > > name 'data' is not defined" error. > > > > import timeit > > > > global data > > data = [3,8,4,8,6,0,5,7,2,1] > > > > env = "global data; x = data" > > > > print

Re: timeit's environment

2005-12-04 Thread Alex Martelli
<[EMAIL PROTECTED]> wrote: > Why doesn't the following work? It generates a "NameError: global > name 'data' is not defined" error. > > import timeit > > global data > data = [3,8,4,8,6,0,5,7,2,1] > > env = "global data; x = data" > > print timeit.Timer('x.sort()', env).timeit() >