On May 24, 12:23 pm, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> On May 24, 12:41 pm, 7stud <[EMAIL PROTECTED]> wrote:
>
>
>
> > Actually, you can do this:
>
> > class Dog(object):
> > def aFunction(self):
> > result = 20 + 2
> > def run(self):
> > #do stuff
> >
On May 24, 12:23 pm, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> On May 24, 12:41 pm, 7stud <[EMAIL PROTECTED]> wrote:
>
>
>
> > Actually, you can do this:
>
> > class Dog(object):
> > def aFunction(self):
> > result = 20 + 2
> > def run(self):
> > #do stuff
> >
On May 24, 12:41 pm, 7stud <[EMAIL PROTECTED]> wrote:
> Actually, you can do this:
>
> class Dog(object):
> def aFunction(self):
> result = 20 + 2
> def run(self):
> #do stuff
> aFunction()
> #do other stuff
> import timeit
>
> t = timeit.Timer("d.aFunction()
On May 24, 12:41 pm, 7stud <[EMAIL PROTECTED]> wrote:
> Actually, you can do this:
>
> class Dog(object):
> def aFunction(self):
> result = 20 + 2
> def run(self):
> #do stuff
> aFunction()
> #do other stuff
> import timeit
>
> t = timeit.Timer("d.aFunction()
Actually, you can do this:
class Dog(object):
def aFunction(self):
result = 20 + 2
def run(self):
#do stuff
aFunction()
#do other stuff
import timeit
t = timeit.Timer("d.aFunction()", "from __main__ import Dog; d =
Dog()")
print t.timeit()
Since you only
On May 24, 11:30 am, 7stud <[EMAIL PROTECTED]> wrote:
> On May 24, 9:36 am, "[EMAIL PROTECTED]"
>
>
>
> <[EMAIL PROTECTED]> wrote:
> > Hi,
>
> > I am using timeit to time a global function like this
>
> > t = timeit.Timer("timeTest()","from __main__ import timeTest")
> > result = t.timeit();
>
> >
On May 24, 9:36 am, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> Hi,
>
> I am using timeit to time a global function like this
>
> t = timeit.Timer("timeTest()","from __main__ import timeTest")
> result = t.timeit();
>
> But how can i use timeit to time a function in a class?
> class FetchUrlTh
On May 24, 8:36 pm, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> Hi,
>
> I am using timeit to time a global function like this
>
> t = timeit.Timer("timeTest()","from __main__ import timeTest")
> result = t.timeit();
>
> But how can i use timeit to time a function in a class?
> class FetchUrlTh
Hi,
I am using timeit to time a global function like this
t = timeit.Timer("timeTest()","from __main__ import timeTest")
result = t.timeit();
But how can i use timeit to time a function in a class?
class FetchUrlThread(threading.Thread):
def aFunction(self):
# do something