#NEWLINE# def get_bool_var( self ) : #NEWLINE# #INDENT# '\n        Returns either a variable by itself or a non-boolean operation (such as\n        ``x == 0`` or ``x < 0``).\n\n        This is needed to keep correct precedence for boolean operations (i.e.\n        ``x or x == 0`` should be ``x or (x == 0)``, not ``(x or x) == 0``).\n        ' #NEWLINE# var = self . get_var ( ) #NEWLINE# if ( not self . at_end ( ) ) : #NEWLINE# #INDENT# op_token = self . get_token ( lookahead = True ) [ 0 ] #NEWLINE# if ( isinstance ( op_token , basestring ) and ( op_token not in BOOL_OPERATORS ) ) : #NEWLINE# #INDENT# ( op , negate ) = self . get_operator ( ) #NEWLINE# return op ( var , self . get_var ( ) , negate = negate ) #NEWLINE# #UNINDENT# #UNINDENT# return var