original_docstring: 
          Parameters
          ----------
          source : list, Collection, dict
          copyvalues : None, shallow, deep
            If None, values will simply be bound to the collection items'
            values thus sharing the same instance. 'shallow' and 'deep' copies use
            'copy' and 'deepcopy' correspondingly.
          memo : dict
            Developers only: This argument is only useful if copy() is called
            inside the __deepcopy__() method and refers to the dict-argument
            `memo` in the Python documentation.
          
docstring: Parameters
  source : list, Collection, dict
  copyvalues : None, shallow, deep
  If None, values will simply be bound to the collection items'
  values thus sharing the same instance.
docstring_tokens: Parameters source : list Collection dict copyvalues : None shallow deep If None values will simply be bound to the collection items ' values thus sharing the same instance .
code: def update(self, source, copyvalues=None, memo=None):
          """
          Parameters
          ----------
          source : list, Collection, dict
          copyvalues : None, shallow, deep
            If None, values will simply be bound to the collection items'
            values thus sharing the same instance. 'shallow' and 'deep' copies use
            'copy' and 'deepcopy' correspondingly.
          memo : dict
            Developers only: This argument is only useful if copy() is called
            inside the __deepcopy__() method and refers to the dict-argument
            `memo` in the Python documentation.
          """
          if isinstance(source, list):
              for a in source:
                  if isinstance(a, tuple):
                      #list of tuples, e.g. from dict.items()
                      name = a[0]
                      value = a[1]
                  else:
                      # list of collectables
                      name = a.name
                      value = a
  
                  if copyvalues is None:
                      self[name] = value
                  elif copyvalues == 'shallow':
                      self[name] = copy.copy(value)
                  elif copyvalues == 'deep':
                      self[name] = copy.deepcopy(value, memo)
                  else:
                      raise ValueError("Unknown value ('%s') for copy argument."
                                       % copy)
          elif isinstance(source, dict):
              for k, v in source.iteritems():
                  # expand the docs
                  if isinstance(v, tuple):
                      value = v[0]
                      doc = v[1]
                  else:
                      value = v
                      doc = None
                  # add the attribute with optional docs
                  if copyvalues is None:
                      self[k] = v
                  elif copyvalues == 'shallow':
                      self[k] = copy.copy(v)
                  elif copyvalues == 'deep':
                      self[k] = copy.deepcopy(v, memo)
                  else:
                      raise ValueError("Unknown value ('%s') for copy argument."
                                       % copy)
                  # store documentation
                  self[k].__doc__ = doc
          else:
              raise ValueError("Collection.update() cannot handle '%s'."
                               % str(type(source)))
code_tokens: def update ( self , source , copyvalues = None , memo = None ) : if isinstance ( source , list ) : for a in source : if isinstance ( a , tuple ) : name = a [ 0 ] value = a [ 1 ] else : name = a . name value = a if copyvalues is None : self [ name ] = value elif copyvalues == 'shallow' : self [ name ] = copy . copy ( value ) elif copyvalues == 'deep' : self [ name ] = copy . deepcopy ( value , memo ) else : raise ValueError ( "Unknown value ('%s') for copy argument." % copy ) elif isinstance ( source , dict ) : for k , v in source . iteritems ( ) : if isinstance ( v , tuple ) : value = v [ 0 ] doc = v [ 1 ] else : value = v doc = None if copyvalues is None : self [ k ] = v elif copyvalues == 'shallow' : self [ k ] = copy . copy ( v ) elif copyvalues == 'deep' : self [ k ] = copy . deepcopy ( v , memo ) else : raise ValueError ( "Unknown value ('%s') for copy argument." % copy ) self [ k ] . __doc__ = doc else : raise ValueError ( "Collection.update() cannot handle '%s'." % str ( type ( source ) ) )
short_docstring: Parameters
  source : list, Collection, dict
  copyvalues : None, shallow, deep
  If None, values will simply be bound to the collection items'
  values thus sharing the same instance.
short_docstring_tokens: Parameters source : list Collection dict copyvalues : None shallow deep If None values will simply be bound to the collection items ' values thus sharing the same instance .
comment: """
          Parameters
          ----------
          source : list, Collection, dict
          copyvalues : None, shallow, deep
            If None, values will simply be bound to the collection items'
            values thus sharing the same instance. 'shallow' and 'deep' copies use
            'copy' and 'deepcopy' correspondingly.
          memo : dict
            Developers only: This argument is only useful if copy() is called
            inside the __deepcopy__() method and refers to the dict-argument
            `memo` in the Python documentation.
          """$SEP$#list of tuples, e.g. from dict.items()$SEP$# list of collectables$SEP$# expand the docs$SEP$# add the attribute with optional docs$SEP$# store documentation