Skip to content

Instantly share code, notes, and snippets.

@jnmclarty
Last active December 1, 2015 02:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jnmclarty/279ffb629cb5607e9473 to your computer and use it in GitHub Desktop.
Save jnmclarty/279ffb629cb5607e9473 to your computer and use it in GitHub Desktop.
partial usage of partial
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