Created
December 25, 2012 12:55
-
-
Save brabadu/4373043 to your computer and use it in GitHub Desktop.
kwargs-based templating
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
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