On 9/12/07, David <[EMAIL PROTECTED]> wrote: > > Please help if I am missing something -- this looks like a great > > language but I am going to mad trying to read numerical code full of > > 'self.'s breaking up the equations. > > You could try this in your functions: > > s = self > > Then you can use code like this: s.a_dot = s.k(s.a-s.u) > > Another option, if you use the vars a lot in a given function, is to > copy them to local vars. This can also slightly speed up your code > (fewer member lookups). >
Also, there is no rule saying you need to use "self", it's just a convention. You can declare your methods like this instead: def foo(s, arg1, arg2): s.a_dot = s.k(s.a-s.u) -- http://mail.python.org/mailman/listinfo/python-list