Possible (inferior) solutions

Solution 1: global parameters
global a, b, c
...
def f(x, y):
    return a + b*x + c*y*y

...
a = 0.5;  b = 1;  c = 0.01
gridvalues(f, xcoor, ycoor, somefile)
Global variables are usually considered evil
Solution 2: keyword arguments for parameters
def f(x, y, a=0.5, b=1, c=0.01):
    return a + b*x + c*y*y

...
gridvalues(f, xcoor, ycoor, somefile)
useless for other values of a, b, c

previousnexttable of contents