title: how to pass parameters of a function when using timeit.Timer()
body: <p>This is the outline of a simple program</p>
  
  <pre><code># some pre-defined constants
  A = 1
  B = 2
  
  # function that does something critical
  def foo(num1, num2):
      # do something
  
  # main program.... do something to A and B
  for i in range(20):
      # do something to A and B
      # and update A and B during each iteration
  
  import timeit
  t = timeit.Timer(stmt="foo(num1,num2)")  
  print t.timeit(5)
  </code></pre>
  
  <p>I just keep getting "global name foo is not defined".....
  Can anyone help me on this? Thanks!</p>