def is_comment_too_deep(parent):
 return ((MAX_COMMENT_DEPTH is not None) and ((MAX_COMMENT_DEPTH < 0) or (parent and (parent['depth'] >= MAX_COMMENT_DEPTH))))

def is_comment_too_deep ( parent ) : return ( ( MAX_COMMENT_DEPTH is not None ) and ( ( MAX_COMMENT_DEPTH < 0 ) or ( parent and ( parent [ 'depth' ] >= MAX_COMMENT_DEPTH ) ) ) )
determine whether a comment with the given parent violates max_comment_depth parent can be none to determine whether root comments are allowed .