Skip to content

Commit 8781d62

Browse files
author
krsm
committed
changing indentation
1 parent 7e22781 commit 8781d62

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

decorators.py

+13-7
Original file line numberDiff line numberDiff line change
@@ -4,34 +4,40 @@
44
55
"""
66

7+
78
# First example
89
def outerfunction(outer):
10+
print("test")
911
def innerfunction(inner):
1012
return outer(inner) + 1
1113
return innerfunction
1214

15+
1316
@outerfunction
1417
def addone(x):
1518
return x + 1
1619

20+
1721
# Second Example
1822
def wrapfunction(fn):
19-
print("Executing wra_function")
23+
print("Executing wrapfunction")
24+
2025
def wrappedfunction():
2126
print("Calling %s inside wrappedfunction" % fn.__name__)
2227
# calling fn
2328
fn()
2429
print("Executed %s inside wrappedfunction" % fn.__name__)
2530
return wrappedfunction
2631

32+
2733
@wrapfunction
2834
def tobedecorated():
2935
print("Executing tobedecorated function")
3036

3137
if __name__ == "__main__":
32-
33-
pass
34-
#first example
35-
#print(addone(5))
36-
#second example
37-
#tobedecorated()
38+
39+
# pass
40+
# first example
41+
# print(addone(5))
42+
# second example
43+
tobedecorated()

0 commit comments

Comments
 (0)