Open Lucas-C opened 8 years ago
Currently I use this ugly workaround to perform what I want:
class DefaultDictContainsEverything(defaultdict):
def __contains__(self, item):
return True
pystache.render("Hello {{}} !", DefaultDictContainsEverything(lambda: "Anonymous visitor"))
Hi,
Following the "it's Easier to Ask Forgiveness than Permission" principle, is it possible to modify 2 lines in pystache.context:_get_value ?
This would make it possible to pass a
collections.defaultdict
topystache.render
, which does not work currently: