-
-
Save orlp/cfeb949a4dc5800244f8 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
def modify(f): | |
if some_external_input(): | |
def modified_function(*args, **kwargs): | |
return f(*args, **kwargs) + 2 | |
return modified_function | |
return f |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment