def rate(check, co): check.valid_email() check.other('comment_topic_frozen', co.topic.is_frozen()) check.other('comment_topic_instance_frozen', co.topic.instance.frozen) show(check, co) check.other('comment_poll_is_none', co.poll is not None) poll.vote(check, co.poll)
def rate(c): if c.topic.instance.frozen: return False return show(c) and c.poll is not None and poll.vote(c.poll)