Last active
December 1, 2015 02:42
-
-
Save jnmclarty/279ffb629cb5607e9473 to your computer and use it in GitHub Desktop.
partial usage of partial
This file contains 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
from functools import partial | |
import os | |
rel_path = partial(os.path.join, os.path.dirname(__file__)) | |
f = rel_path("../config/foo.ini") | |
print_stderr = partial(print, file=sys.stderr) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment