-
Object inheritance
-
Super
-
Decorators
-
Class variables
-
Class methods
-
Bonus: Building your own decorator
-
Bonus: Lambdas
def my_decorator(func):
def wrapper():
print("Something is happening before the function is called.")
func()
print("Something is happening after the function is called.")
return wrapper
add = lambda x,y: x + y