Coverage for eng_econ/__init__.py : 100%

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"
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]})
14 :param i: Interest rate per interest period
16 :param n: Number of compounding periods
18 :return: {name} factor
19 """
21 def dec(obj):
22 obj.__doc__ = docstring
23 return obj
25 return dec