Last active
November 30, 2017 17:50
-
-
Save elyssonmr/b7ef94dacbd99a8ddf6d7f4f33bceefa to your computer and use it in GitHub Desktop.
Complexo
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
import functools | |
from http_module import HTTPClient() | |
def _do_upload_something(client, something_headers, something_body): | |
client.post("my_url", something_body, headers=something_headers) | |
client = HTTPClient() | |
upload_something = functools.partial(_do_upload_something, client) | |
# Someone calls this function as a callback just like that | |
upload_something(headers, body) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment