self

Sean 'Shaleh' Perry shalehperry at attbi.com
Tue Jun 4 16:56:04 EDT 2002


On 04-Jun-2002 Vojin Jovanovic wrote:
> I don't see how that is going to work.  In fact I tried things like that
> before without success.  Just sticking the dictionary into eval/exec is
> missing the point.  Every time parsing is done flow needs to go through
> __getattr__ special method to evaluate nested equations.  Without self. you
> can't achieve that effect.  Try the approach you suggested and you'll get
> '#U'.
> 

calc.setEquation('f = a*c')
calc.valueFor('f')

sometimes you can just redesign.





More information about the Python-list mailing list