Unwraps the elements of ``value`` using ``ListField.item_type`` and
            returns them in a list
346714
def unwrap(self, value, session=None):
        ''' '''
        kwargs = {}
        if self.has_autoload:
            kwargs['session'] = session
        self.validate_unwrap(value, **kwargs)
        return [ self.item_type.unwrap(v, **kwargs) for v in value]
237381
def _parse_list(cls, value, separator=','):
        
        if isinstance(value, list):  # _get_parser_compound case
            return value

        if '\n' in value:
            value = value.splitlines()
        else:
            value = value.split(separator)

        return [chunk.strip() for chunk in value if chunk.strip()]
440186
def clean(self, value):
		

		# If the value is None and it's optional, return as is
		if value is None and self._optional:
			return None

		# If the value is not a list
		if not isinstance(value, list):
			raise ValueError('value')

		# Recurse and return it
		return [self._node.clean(m) for m in value]
531162
def parse(self, value):
        
        if self.required and value is None:
            raise ValueError("%s is required!" % self.name)
        elif self.ignored and value is not None:
            warn("%s is ignored for this class!" % self.name)
        elif not self.multi and isinstance(value, (list, tuple)):
            if len(value) > 1:
                raise ValueError(
                    "%s does not accept multiple values!" % self.name
                )
            return value[0]
        elif self.multi and value is not None:
            if not isinstance(value, (list, tuple)):
                return [value]
        return value
681478
def _type_container(self, value, _type):
        '  '
        if value is None:
            # normalize null containers to empty list
            return []
        elif not isinstance(value, list):
            raise ValueError("expected list type, got: %s" % type(value))
        else:
            return sorted(self._type_single(item, _type) for item in value)
1179184
def encode_list(cls, value):
        
        encoded = base64.b64encode(six.b(" ".join(str(v) for v in value) or "-"))
        return encoded.decode("utf-8") if six.PY3 else encoded
348324
function unwrap(attrVal) {
  var result = {};
  for (var key in attrVal) {
    if(attrVal.hasOwnProperty(key)) {
      var value = attrVal[key];
      if (value !== null && typeof value !== 'undefined') 
        result[key] = unwrap1(attrVal[key]);
    }
  }
  return result;
}
577294
def _flatten(self, field, items, transform = None):
		
		
		# Retrieve the value for each item in the iterable
		values = [item[field] for item in items]
		
		# Flatten any nested lists
		flattened = []
		for value in values:
			flattened.extend([value] if isinstance(value, str) else value)
		
		# Apply any supplied transformation function
		return transform(flattened) if transform != None else flattened
228119
def to_python(self, value):
        ""
        # Return None if no input was given.
        if not value:
            return []
        return [v.strip() for v in value.splitlines() if v != ""]
233996
def format_value(value):
    
    if isinstance(value, list):
        value = ", ".join([v.strip() for v in value])
    return value
406217
def maybe_cast_list(value, types):
    
    if not isinstance(value, list):
        return value

    if type(types) not in (list, tuple):
        types = (types,)

    for list_type in types:
        if issubclass(list_type, list):
            try:
                return list_type(value)
            except (TypeError, ValueError):
                pass
    return value
1249211
def coerce_value(cls, v):
        """"""
        if isinstance(v, cls.itemtype):
            return v
        else:
            try:
                return cls.coerceitem(v)
            except Exception as e:
                raise exc.CollectionItemCoerceError(
                    itemtype=cls.itemtype,
                    colltype=cls,
                    passed=v,
                    exc=e,
                )
1053612
def _merge(self, value):
        
        if not value:
            return []

        if value is not None and not isinstance(value, list):
            # bogus value; will not pass validation but should be preserved
            return value

        item_spec = self._nested_validator
        return [x if x is None else item_spec.get_default_for(x) for x in value]
991002
def _wrap(self, value):
        
        if isinstance(value, dict):
            if any(isinstance(name, int) for name in value.keys()):
                if not all(isinstance(name, int) for name in value.keys()):
                    raise RuntimeError("Integer and non-integer keys: %r"
                                       % value.keys())
                items = sorted(value.iteritems(), key=itemgetter(0))
                return [self._wrap(val) for _, val in items]
            else:
                return Arguments(value)
        elif isinstance(value, list):
            return [self._wrap(x) for x in value]
        else:
            return value
1086944
def scantypes(cls, value, value_type, visitor):
        

        item_type_generator = None
        if issubclass(value_type, Collection):

            def get_item_types():
                if isinstance(value_type.itemtype, tuple):
                    # not actually supported by Collection yet, but whatever
                    for vt in value_type.itemtype:
                        yield (vt, vt)
                else:
                    yield value_type.itemtype, value_type.itemtype

            item_type_generator = get_item_types()

        propget = None
        if issubclass(value_type, Record):
            def propget(prop):
                return prop

        return propget, item_type_generator
683985
def serialize_list(self, value):
        

        # Check if this is a list or a tuple
        if not isinstance(value, (list, tuple)):
            return value

        # Loop over all the values and serialize the values
        return [
            self.serialize_value(list_value)
            for list_value in value
        ]
1286419
def ungrist (value):
    
    assert is_iterable_typed(value, basestring) or isinstance(value, basestring)
    def ungrist_one (value):
        stripped = __re_grist_content.match (value)
        if not stripped:
            raise BaseException ("in ungrist: '%s' is not of the form <.*>" % value)

        return stripped.group (1)

    if isinstance (value, str):
        return ungrist_one (value)
    else:
        return [ ungrist_one (v) for v in value ]