-
-
Save esenthil2018/236ff9125c4f0fa1efff2928db05bda7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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