Skip to content

Instantly share code, notes, and snippets.

@brabadu
Created December 25, 2012 12:55
Show Gist options
  • Save brabadu/4373043 to your computer and use it in GitHub Desktop.
Save brabadu/4373043 to your computer and use it in GitHub Desktop.
kwargs-based templating
def third(third_css, n):
print third_css, n
def second(q, third_p, third_css=''):
print q
third(third_css, **third_p)
return q
def first(a, b, second_p, d):
print a,b,second_p,d
return second(third_css='qwe', **second_p)
first_p = {
'a': [1],
'b': 1,
'eeee': 1,
'second_p': {
'q': 4,
'third_p': {
'n': 'third'
}
}
}
first(d=5, **first_p)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment