Last active
July 7, 2016 08:43
-
-
Save dreamingbinary/bbf8561e7ec34610c9603aa1b6a03bde to your computer and use it in GitHub Desktop.
Python dict-style interpolation
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
print("Executing on %s as %s" % (env.host, env.user)) | |
# Using dict-style interpolation is more readable and slightly shorter: | |
print("Executing on %(host)s as %(user)s" % env) | |
# Reference: http://docs.fabfile.org/en/1.11/usage/env.html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment