Charlie Taylor wrote:
flow = integrate(lambda x: 2.0*pi * d(x)* v(x) * sin(a(x)),xBeg, xEnd)
def _flow_func(x): return 2.0 * pi * d(x) * v(x) * sin(a(x)) flow = integrate(_flow_func, xBeg, xEnd)
root = findRoot(xBeg, xEnd, lambda x: y2+ lp*(x-x2) -wallFunc( x )[0], tolerance=1.0E-15)
def _root_func(x): return y2 + lp*(x - x2) - wallFunc(x)[0] root = findRoot(xBeg, xEnd, _root_func, tolerance=1.0e-15)
I think those are much easier to follow. I find consistent punctuation spacing helps readability too...
--
Michael Hoffman
--
http://mail.python.org/mailman/listinfo/python-list