diff --git a/decorators/__init__.py b/decorators/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/decorators/main.py b/decorators/main.py new file mode 100644 index 0000000..6745270 --- /dev/null +++ b/decorators/main.py @@ -0,0 +1,19 @@ +def my_decorator(f): + def wrap(): + print('It has a decorator') + f() + + return wrap + + +@my_decorator +def my_func(): + print("The function my_func") + + +def main(): + my_func() + + +if __name__ == '__main__': + main()