Decorator simple sample
def myDecorator4 (funcToDecorate):
def theReturnFunct (pVal):
funcToDecorate(pVal)
print ("And the next Call please ")
funcToDecorate(pVal + 6 )
print ("finished")
return theReturnFunct
@myDecorator4
def myFunct164 (pVal):
print ("This is my test: " + str( pVal))
myFunct164 (6)
אין תגובות:
הוסף רשומת תגובה