Skip to content

Commit a781027

Browse files
committedSep 22, 2019
Decorator refactoring/learning
1 parent 1ecc231 commit a781027

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed
 

‎Decorators/WhatIsDecorators.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,3 +137,12 @@ def divide(a,b):
137137
# I am going to divide 5 and 2
138138
# 2.5
139139

140+
141+
def parentFun(func):
142+
def internalFun():
143+
print("inside internal")
144+
func()
145+
return internalFun
146+
147+
148+
parentFun(ordinary())

0 commit comments

Comments
 (0)