diff --git a/quiet_night.py b/quiet_night.py new file mode 100644 index 0000000..bdb38e9 --- /dev/null +++ b/quiet_night.py @@ -0,0 +1,12 @@ +from datetime import datetime + +def not_during_the_night(func): + def wrapper(): + if 7 <= datetime.now().hour < 22: + func() + else: + pass # Hush, the neighbors are asleep + return wrapper + +def say_whee(): + print("Whee!")