return False
def _test_post(post, tree):
+ """Test if the list of tags in the post satisfies condition
+
+ Recursively evaluate the tree against the list of tags in the post.
+
+ """
op = tree[0]
if op == 'NAME':
tag = tree[1]
raise ValueError("Cannot get there")
def find_tags(tree):
+ """Test every blog post against parsed expression
+
+ Return all posts that passed the test.
+
+ """
_posts = []
for (year, month, day), posts in blog_dict.iteritems():
for post in posts: