Skip to content

Instantly share code, notes, and snippets.

@esenthil2018
Created January 17, 2022 07:54
Show Gist options
  • Save esenthil2018/4f67e30bd58fc9daf73becc523f285b2 to your computer and use it in GitHub Desktop.
Save esenthil2018/4f67e30bd58fc9daf73becc523f285b2 to your computer and use it in GitHub Desktop.
# passing the argument:
def passing_arguments(fn):
def wrapper_arguments(arg1, arg2):
print ('Arguments are passed:', arg1,",", arg2)
fn(arg1, arg2)
return wrapper_arguments
@passing_arguments
def orig_function(city, state):
print ('My city is', city)
print ('My State is', state)
orig_function('San Jose', 'California')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment