forked from DonJayamanne/pythonVSCode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdecorators.py
More file actions
28 lines (22 loc) · 810 Bytes
/
decorators.py
File metadata and controls
28 lines (22 loc) · 810 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
def identity(ob):
return ob
@identity
def myfunc():
print "my function"
myfunc()
# https://github.com/DonJayamanne/pythonVSCode/issues/1046
from fabric.api import sudo
# currently go to definition of sudo will go to some decorator function
# works, if fabric package is not installed
sudo()
from numba import jit
# https://github.com/DonJayamanne/pythonVSCode/issues/478
@jit()
def calculate_cash_flows(remaining_loan_term, remaining_io_term,
settle_balance, settle_date, payment_day,
ir_fixed, ir_accrual_day_count_basis,
amortizing_debt_service):
print("")
# currently go to definition of sudo will go to some decorator function
# works, if fabric package is not installed
calculate_cash_flows(1,2,3,4,5,6,7,8)