Created
January 17, 2022 07:54
-
-
Save esenthil2018/4f67e30bd58fc9daf73becc523f285b2 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