Re: How to pass instance into decorator function

2013-06-13 Thread Peter Otten
Jayakrishnan Damodaran wrote: > I have a class which calculates some salary allowances. Instead of a blind > calculation I need to check some conditions before I can return the > calculated amount. Like if all the allowances calculated till now plus the > one in progress must not exceed the total

How to pass instance into decorator function

2013-06-13 Thread Jayakrishnan Damodaran
I have a class which calculates some salary allowances. Instead of a blind calculation I need to check some conditions before I can return the calculated amount. Like if all the allowances calculated till now plus the one in progress must not exceed the total salary(this may occur since these al