This commit is contained in:
Mia Steinkirch 2019-10-12 16:07:57 -07:00
parent 1ef64d6e17
commit e0eb554dfd
279 changed files with 24267 additions and 0 deletions

View file

@ -0,0 +1,19 @@
#!/bin/python
#
# An example of Python Decorator
#
def pretty_sumab(func):
def inner(a,b):
print(str(a) + " + " + str(b) + " is ", end="")
return func(a,b)
return inner
@pretty_sumab
def sumab(a,b):
summed = a + b
print(summed)
if __name__ == "__main__":
sumab(5,3)