Return member value addressed by the receiver + its schema node.

        Args:
            val: Current value (object).
            sn:  Current schema node.
320810
def peek_step(self, val: ObjectValue,
                  sn: "DataNode") -> Tuple[Value, "DataNode"]:
        
        cn = sn.get_data_child(self.name, self.namespace)
        try:
            return (val[cn.iname()], cn)
        except (IndexError, KeyError, TypeError):
            return (None, cn)
886680
public String setValue(String val) {
        String oldVal = this.val;
        if (parent != null) {
            oldVal = parent.get(this.key); // trust the container more
            int i = parent.indexOfKey(this.key);
            if (i != Attributes.NotFound)
                parent.vals[i] = val;
        }
        this.val = val;
        return Attributes.checkNotNull(oldVal);
    }
766943
def from_value(self, value):
        
        if value is None:
            sql_type = NVarCharType(size=1)
        else:
            sql_type = self._from_class_value(value, type(value))
        return sql_type
1183601
def serialzeValueToTCL(self, val, do_eval=False) -> Tuple[str, str, bool]:
        
        return str(val), str(val), True
515667
def ast_value(val, scope, return_name=False):
    '''
    '''
    # :TODO: refactor the hell out of this
    try:
        if isinstance(val, (ast.Assign, ast.Delete)):
            if hasattr(val, 'value'):
                value = ast_value(val.value, scope)
            else:
                value = None
            for t in val.targets:
                name = ast_value(t, scope, return_name=True)
                if isinstance(t.ctx, ast.Del):
                    if name in scope:
                        scope.pop(name)
                elif isinstance(t.ctx, ast.Store):
                    scope[name] = value
            return
        elif isinstance(val, ast.Expr) and isinstance(val.value, ast.Name):
            return ast_value(val.value)

        if isinstance(val, ast.Name):
            if isinstance(val.ctx, ast.Load):
                if val.id == 'None':
                    return None
                elif val.id == 'True':
                    return True
                elif val.id == 'False':
                    return False

                if val.id in scope:
                    return scope[val.id]

                if return_name:
                    return val.id
            elif isinstance(val.ctx, ast.Store):
                if return_name:
                    return val.id
            return None

        if isinstance(val, ast.Subscript):
            toslice = ast_value(val.value, scope)
            theslice = ast_value(val.slice, scope)
            return toslice[theslice]
        elif isinstance(val, ast.Index):
            return ast_value(val.value, scope)
        elif isinstance(val, ast.Slice):
            lower = ast_value(val.lower)
            upper = ast_value(val.upper)
            step = ast_value(val.step)
            return slice(lower, upper, step)

        if isinstance(val, list):
            return [ast_value(x, scope) for x in val]
        elif isinstance(val, tuple):
            return tuple(ast_value(x, scope) for x in val)

        if isinstance(val, ast.Attribute):
            name = ast_value(val.value, scope, return_name=True)
            if isinstance(val.ctx, ast.Load):
                return '.'.join((name, val.attr))
            if return_name:
                return name
        elif isinstance(val, ast.keyword):
            return {val.arg: ast_value(val.value, scope)}
        elif isinstance(val, ast.List):
            return [ast_value(x, scope) for x in val.elts]
        elif isinstance(val, ast.Tuple):
            return tuple(ast_value(x, scope) for x in val.elts)
        elif isinstance(val, ast.Dict):
            return dict(zip([ast_value(x, scope) for x in val.keys],
                            [ast_value(x, scope) for x in val.values]))
        elif isinstance(val, ast.Num):
            return val.n
        elif isinstance(val, ast.Str):
            return val.s
        elif hasattr(ast, 'Bytes') and isinstance(val, ast.Bytes):
            return bytes(val.s)
    except Exception:
        # Don't care, just return None
        pass

    return None
1231698
function val(newVal) {
      var query;

      if (!arguments.length) {
        ttEach(this.first(), function(t) { query = t.getVal(); });
        return query;
      }

      else {
        ttEach(this, function(t) { t.setVal(newVal); });
        return this;
      }
    }
1315284
def parse_value(self, val, display, rawdict = 0):

        
        ret = {}
        vno = 0
        for f in self.static_fields:
            # Fields without names should be ignored, and there should
            # not be any length or format fields if this function
            # ever gets called.  (If there were such fields, there should
            # be a matching field in var_fields and then parse_binary
            # would have been called instead.

            if not f.name:
                pass

            elif isinstance(f, LengthField):
                pass

            elif isinstance(f, FormatField):
                pass

            # Value fields
            else:
                # If this field has a parse_value method, call it, otherwise
                # use the unpacked value as is.
                if f.structvalues == 1:
                    field_val = val[vno]
                else:
                    field_val = val[vno:vno+f.structvalues]

                if f.parse_value is not None:
                    field_val = f.parse_value(field_val, display, rawdict=rawdict)
                ret[f.name] = field_val

            vno = vno + f.structvalues

        if not rawdict:
            return DictWrapper(ret)
        return ret
562637
function(type, val){
    var res = {type: type, line: this.lineno, col: this.colno};

    if (val !== undefined) res.val = val;

    return res;
  }
1163219
protected Val nextSimpleValue() throws IOException {
      switch (currentValue.getKey()) {
         case NULL:
         case STRING:
         case BOOLEAN:
         case NUMBER:
            Val object = currentValue.v2;
            consume();
            return object;
         default:
            throw new IOException("Expecting VALUE, but found " + jsonTokenToStructuredElement(null));
      }
   }
577979
def _get_val(other):
    
    assert isinstance(other, (numbers.Number, SymbolNUMBER, SymbolCONST))
    if isinstance(other, SymbolNUMBER):
        return other.value

    if isinstance(other, SymbolCONST):
        return other.expr.value

    return other
721546
def resolve(val):
    
    name = val.getName()
    if name == "number":
        try:
            return int(val.number)
        except ValueError:
            return Decimal(val.number)
    elif name == "str":
        return unwrap(val.str)
    elif name == "null":
        return None
    elif name == "binary":
        return Binary(val.binary[2:-1])
    elif name == "set":
        if val.set == "()":
            return set()
        return set([resolve(v) for v in val.set])
    elif name == "bool":
        return val.bool == "TRUE"
    elif name == "list":
        return [resolve(v) for v in val.list]
    elif name == "dict":
        dict_val = {}
        for k, v in val.dict:
            dict_val[resolve(k)] = resolve(v)
        return dict_val
    elif name == "ts_function":
        return dt_to_ts(eval_function(val.ts_function))
    elif name == "ts_expression":
        return dt_to_ts(eval_expression(val))
    else:
        raise SyntaxError("Unable to resolve value '%s'" % val)
796973
def serialize(self, node: SchemaNode,
                  value: Any) -> Union[str, ColanderNullType]:
        
        if value is None:
            retval = ''
        else:
            # noinspection PyUnresolvedReferences
            retval = self.type_.serialize(node, value)
        # log.debug("AllowNoneType.serialize: {!r} -> {!r}", value, retval)
        return retval
213728
public <V extends Val> V returning(V val) {
    if (val instanceof ValFrame)
      _ses.addRefCnt(val.getFrame(), 1);
    return val;
  }
1277914
@Override
    public void noteValue(double val) {
        super.noteValue(val);
        buf[insertPos++] = val;
        if (insertPos >= buf.length) {
            insertPos = 0;
            size = buf.length;
        } else if (insertPos > size) {
            size = insertPos;
        }
    }
1146278
function (val) {
        return val &&
            typeof val === 'object' &&
            !(val instanceof Date) &&
            !(val instanceof ObjectId) &&
            (!Array.isArray(val) || val.length > 0) &&
            !(val instanceof Buffer);
    }
292726
def append(self, val):
        
        self.values.append(val)
        self.value = self.values[0]
424079
def meaningful_value(self, val, undefined):
        
        if isinstance(val, fields.files.FieldFile):
            return val.name and not (
                isinstance(undefined, fields.files.FieldFile) and val == undefined)
        return val is not None and val != undefined