Hide keyboard shortcuts

Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1__version__ = "0.1.0" 

2 

3 

4def generate_dcostring(first_notation, second_notation, name): 

5 notations = { 

6 "F": "Future worth, value, or amount", 

7 "P": "Present worth, value, or amount", 

8 "A": "Uniform amount per interest period", 

9 "G": "Uniform gradient amount per interest period", 

10 } 

11 docstring = f""" 

12 Factor applies to {first_notation}/{second_notation} => to {first_notation} ({notations[first_notation]}) given {second_notation} ({notations[second_notation]}) 

13 

14 :param i: Interest rate per interest period 

15 

16 :param n: Number of compounding periods 

17 

18 :return: {name} factor 

19 """ 

20 

21 def dec(obj): 

22 obj.__doc__ = docstring 

23 return obj 

24 

25 return dec