Skip to content

Instantly share code, notes, and snippets.

@esenthil2018
Created January 16, 2022 01:24
Show Gist options
  • Select an option

  • Save esenthil2018/236ff9125c4f0fa1efff2928db05bda7 to your computer and use it in GitHub Desktop.

Select an option

Save esenthil2018/236ff9125c4f0fa1efff2928db05bda7 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