-
-
Save kergoth/5f305082ed03953cd56f528f95a3d643 to your computer and use it in GitHub Desktop.
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 getvars(d, *vars, expand=True): | |
return tuple(d.getVar(var, expand) for var in vars) | |
def getvars_with(d, *vars, update_dict=None): | |
if update_dict: | |
d = d.createCopy() | |
d.update(update_dict) | |
return tuple(d.get(var) for var in vars) | |
def getvars_with(d, update_dict, *vars): | |
l = d.createCopy() | |
l.update(update_dict) | |
return tuple(l.getVar(var) for var in vars) | |
def getvar_with(d, update_dict, var): | |
return getvars_with(d, update_dict, var) | |
def expand_with(d, update_dict, string): | |
l = d.createCopy() | |
l.update(update_dict) | |
return l.expand(string) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment