Is there a way to do something like that in python?
def foo(str(arg).lower()):
print arg
foo('LOL')
I wanted to create decorator in the first place but whatever i try i could not get it to work as I wanted, i either get generator returned or list.
Edit: This is what I wanted to accomplish.
def to_lowercase(function):
def wrapper(*args):
return function(*[x.lower() if isinstance(x, str) else x for x in args])
return wrapper