Last active
December 9, 2020 14:13
-
-
Save codecakes/03b31f77df5d760341b4fd8c140973ad to your computer and use it in GitHub Desktop.
OOPS..I did it again
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 executor(driver_out): | |
return f"this is %s" %driver_out | |
def connector(driver): | |
return executor(driver()) | |
def blaster_driver(): | |
return "very important blasting info" | |
def contractor_driver(): | |
return "very shallow contracting info" | |
def msg_packet(connector: object, driver): | |
return connector(driver) | |
partialExecutor = functools.partial(msg_packet, connector) | |
print(partialExecutor(blaster_driver)) | |
>> this is very important blasting info | |
print(partialExecutor(contractor_driver)) | |
>> this is very shallow contracting info |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment