Skip to content

Instantly share code, notes, and snippets.

@martin-martin
Created June 13, 2018 10:35
Show Gist options
  • Save martin-martin/f50aecd17a3a03d794bf2c469c2122b6 to your computer and use it in GitHub Desktop.
Save martin-martin/f50aecd17a3a03d794bf2c469c2122b6 to your computer and use it in GitHub Desktop.
stayCalm created by martin_martin - https://repl.it/@martin_martin/stayCalm
# a function decorator to avoid digital screaming
def lowercase(func):
def wrapper(text):
initial_result = func(text)
new_result = initial_result.lower()
return new_result
return wrapper
@lowercase
def say_something(text):
return text
print(say_something("HEI WHAT'S UP?"))
# hei what's up?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment