Evaluate text and return (obj, valid)
        where *obj* is the object represented by *text*
        and *valid* is True if object evaluation did not raise any exception
181610
def eval(self, text):
        
        assert is_text_string(text)
        try:
            return eval(text, self.locals), True
        except:
            return None, False
1142557
def isexception(obj):
    
    if isinstance(obj, Exception):
        return True
    if isclass(obj) and issubclass(obj, Exception):
        return True
    return False
1351722
def evaluate(actual_exception, expected_class, expected_message=nil)
      actual_message = actual_exception && actual_exception.message

      if !actual_exception
        fail new_message.expected_to_raise_kind_of(expected_class).but.raised_nothing
      elsif !actual_exception.is_a?(expected_class)
        fail new_message.expected_to_raise_kind_of(expected_class).not(actual_exception.class)
      elsif expected_message && !(actual_message.to_s =~ %r[#{expected_message}])
        fail expected_message(expected_message).for_message.not(actual_message)
      else
        message = new_message.raises_kind_of(expected_class)
        pass(expected_message ? message.with_message(expected_message) : message)
      end
    end
206824
function isArguments(obj) {
    var result = isExisty(obj) &&
        ((toString.call(obj) === '[object Arguments]') || !!obj.callee);

    return result;
}
521696
def valid(self, value, include_name=True):
		

		# Call the parent valid method and return the result
		return super(Tree, self).valid(value, include_name and [self._name] or [])
1069422
function ( obj ) {
		return obj.nodeName === "FORM" ? false : validate.test( {alphanum  : obj.value || element.text( obj )} ).pass;
	}
181507
def _eval(self, text):
        
        from spyder_kernels.py3compat import is_text_string

        assert is_text_string(text)
        ns = self._get_current_namespace(with_magics=True)
        try:
            return eval(text, ns), True
        except:
            return None, False
1177500
def eval_objfn(self):
        

        fval = self.obfn_f()
        gval = self.obfn_g(self.obfn_gvar())
        obj = fval + gval
        return (obj, fval, gval)
967622
def get_validated_object(self, value):
        
        try:
            if self.get_field_type().check_value(value) or self.get_field_type().can_use_value(value):
                data = self.get_field_type().use_value(value)
                self._prepare_child(data)
                return data
            else:
                return None
        except AttributeError:
            return value
1196027
private Object doNewInner(Object obj, boolean toLHS,
            CallStack callstack, Interpreter interpreter) throws EvalError {
        BSHAllocationExpression alloc = (BSHAllocationExpression) jjtGetChild(0);
        if (Reflect.isGeneratedClass(obj.getClass())) {
            callstack.pop();
            callstack.push(Reflect.getThisNS(obj));
            return alloc.eval(callstack, interpreter);
        }

        return alloc.constructFromEnclosingInstance(obj, callstack, interpreter);
    }
1238
def evaluate(actual_exception, expected_class, expected_message=nil)
      actual_message = actual_exception && actual_exception.message
      if actual_exception.nil?
        fail new_message.expected_to_raise(expected_class).but.raised_nothing
      elsif expected_class != actual_exception.class
        fail new_message.expected_to_raise(expected_class).not(actual_exception.class)
      elsif expected_message && !(actual_message.to_s =~ %r[#{expected_message}])
        fail expected_message(expected_message).for_message.not(actual_message)
      else
        message = new_message.raises(expected_class)
        pass(expected_message ? message.with_message(expected_message) : message)
      end
    end
1270178
def _eval(self, teaching):
        
        # transform if someone called _get directly
        if isinstance(teaching, string_types):
            teaching = self._validate_teaching(None, teaching, namespaces=self._namespaces)

        return teaching(self._dataObject)
937054
@Override
	public Object evaluate( Message message ) throws JMSException
    {
        Boolean leftOperandValue = leftOperand.evaluateBoolean(message);
        if (leftOperandValue == null)
        {
            Boolean rightOperandValue = rightOperand.evaluateBoolean(message);
            if (rightOperandValue == null || !rightOperandValue.booleanValue())
                return null;
            
            return Boolean.TRUE;
        }
        else
        {
            if (leftOperandValue.booleanValue())
                return Boolean.TRUE;
            
            return rightOperand.evaluateBoolean(message);
        }
    }
272507
def valueFromString(self, value, extra=None, db=None):
        
        try:
            return projex.text.safe_eval(value)
        except ValueError:
            return 0
921917
def evaluate(str, file = '<in QML::Engine#evaluate>', lineno = 1)
      evaluate_impl(str, file, lineno).tap do |result|
        raise result.to_error if result.is_a?(JSObject) && result.error?
      end
    end
259812
def and_(cls, obj, **kwargs):
        
        return cls.__eval_seqexp(obj, operator.and_, **kwargs)
62589
def literal_eval(node_or_string):
    
    _safe_names = {
        'None': None,
        'True': True,
        'False': False,
        'dict': dict,
        'list': list,
        'sorted': sorted
    }
    
    if isinstance(node_or_string, basestring):
        node_or_string = parse(node_or_string, mode='eval')
        
    if isinstance(node_or_string, ast.Expression):
        node_or_string = node_or_string.body
        
    def _convert(node):
        
        if isinstance(node, ast.Str):
            return node.s
        
        elif isinstance(node, ast.Num):
            return node.n
        
        elif isinstance(node, ast.Tuple):
            return tuple(map(_convert, node.elts))
        
        elif isinstance(node, ast.List):
            return list(map(_convert, node.elts))
        
        elif isinstance(node, ast.Dict):
            return dict((_convert(k), _convert(v)) for k, v
                        in zip(node.keys, node.values))
        
        elif isinstance(node, ast.Name):
            if node.id in _safe_names:
                return _safe_names[node.id]
        
        elif isinstance(node, ast.BinOp):
            left = _convert(node.left)
            right = _convert(node.right)
            op = {
                ast.Add: operator.add,
                ast.Sub: operator.sub,
                ast.Mult: operator.mul,
                ast.Div: operator.div,
                ast.Mod: operator.mod
            }.get(type(node.op), None)
            if op:
                return op(left, right)
        
        elif isinstance(node, ast.Call):
            func = _convert(node.func)
            args = map(_convert, node.args)
            kwargs = dict((kw.arg, _convert(kw.value)) for kw in node.keywords)
            if node.starargs:
                args.extend(_convert(node.starargs))
            if node.kwargs:
                kwargs.update(_convert(node.kwargs))
            return func(*args, **kwargs)
        
        elif isinstance(node, ast.Attribute):
            if not node.attr.startswith('_'):
                return getattr(_convert(node.value), node.attr)
        
        raise ValueError('malformed string: %r' % node)
    return _convert(node_or_string)