original_docstring: Modify the content.
  
          Parameters
          ----------
          row : dict
              A normalized row.  If the names specified by `self.ids` have
              already been seen in a previous call, the entry for the previous
              row is updated.  Otherwise, a new entry is appended.
  
          style :
              Passed to `StyleFields.render`.
  
          Returns
          -------
          A tuple of (content, status), where status is 'append', an integer, or
          'repaint'.
  
            * append: the only change in the content is the addition of a line,
              and the returned content will consist of just this line.
  
            * an integer, N: the Nth line of the output needs to be update, and
              the returned content will consist of just this line.
  
            * repaint: all lines need to be updated, and the returned content
              will consist of all the lines.
          
docstring: Modify the content.
  Parameters
  
  row : dict
  A normalized row.  If the names specified by `self.ids` have
  already been seen in a previous call, the entry for the previous
  row is updated.  Otherwise, a new entry is appended.
  
  style :
  Passed to `StyleFields.render`.
  
  Returns
  
  A tuple of (content, status), where status is 'append', an integer, or
  'repaint'.
  
  the only change in the content is the addition of a line,
  and the returned content will consist of just this line.
  
  an integer, N: the Nth line of the output needs to be update, and
  the returned content will consist of just this line.
  
  all lines need to be updated, and the returned content
  will consist of all the lines.
docstring_tokens: Modify the content . Parameters row : dict A normalized row . If the names specified by ` self . ids ` have already been seen in a previous call the entry for the previous row is updated . Otherwise a new entry is appended . style : Passed to ` StyleFields . render ` . Returns A tuple of ( content status ) where status is ' append ' an integer or ' repaint ' . the only change in the content is the addition of a line and the returned content will consist of just this line . an integer N : the Nth line of the output needs to be update and the returned content will consist of just this line . all lines need to be updated and the returned content will consist of all the lines .
code: def update(self, row, style):
          """Modify the content.
  
          Parameters
          ----------
          row : dict
              A normalized row.  If the names specified by `self.ids` have
              already been seen in a previous call, the entry for the previous
              row is updated.  Otherwise, a new entry is appended.
  
          style :
              Passed to `StyleFields.render`.
  
          Returns
          -------
          A tuple of (content, status), where status is 'append', an integer, or
          'repaint'.
  
            * append: the only change in the content is the addition of a line,
              and the returned content will consist of just this line.
  
            * an integer, N: the Nth line of the output needs to be update, and
              the returned content will consist of just this line.
  
            * repaint: all lines need to be updated, and the returned content
              will consist of all the lines.
          """
          called_before = bool(self)
          idkey = tuple(row[idx] for idx in self.ids)
  
          if not called_before and self.fields.has_header:
              lgr.debug("Registering header")
              self._add_header()
              self._rows.append(ContentRow(row, kwds={"style": style}))
              self._idkey_to_idx[idkey] = 0
              self._idx_to_idkey[0] = idkey
              return str(self), "append"
  
          try:
              prev_idx = self._idkey_to_idx[idkey]
          except KeyError:
              prev_idx = None
          except TypeError:
              raise ContentError("ID columns must be hashable")
  
          if prev_idx is not None:
              lgr.debug("Updating content for row %r", idkey)
              row_update = {k: v for k, v in row.items()
                            if not isinstance(v, Nothing)}
              self._rows[prev_idx].row.update(row_update)
              self._rows[prev_idx].kwds.update({"style": style})
              # Replace the passed-in row since it may not have all the columns.
              row = self._rows[prev_idx][0]
          else:
              lgr.debug("Adding row %r to content for first time", idkey)
              nrows = len(self._rows)
              self._idkey_to_idx[idkey] = nrows
              self._idx_to_idkey[nrows] = idkey
              self._rows.append(ContentRow(row, kwds={"style": style}))
  
          line, adjusted = self.fields.render(row, style)
          lgr.log(9, "Rendered line as %r", line)
          if called_before and adjusted:
              return str(self), "repaint"
          if not adjusted and prev_idx is not None:
              return line, prev_idx + self.fields.has_header
          return line, "append"
code_tokens: def update ( self , row , style ) : called_before = bool ( self ) idkey = tuple ( row [ idx ] for idx in self . ids ) if not called_before and self . fields . has_header : lgr . debug ( "Registering header" ) self . _add_header ( ) self . _rows . append ( ContentRow ( row , kwds = { "style" : style } ) ) self . _idkey_to_idx [ idkey ] = 0 self . _idx_to_idkey [ 0 ] = idkey return str ( self ) , "append" try : prev_idx = self . _idkey_to_idx [ idkey ] except KeyError : prev_idx = None except TypeError : raise ContentError ( "ID columns must be hashable" ) if prev_idx is not None : lgr . debug ( "Updating content for row %r" , idkey ) row_update = { k : v for k , v in row . items ( ) if not isinstance ( v , Nothing ) } self . _rows [ prev_idx ] . row . update ( row_update ) self . _rows [ prev_idx ] . kwds . update ( { "style" : style } ) row = self . _rows [ prev_idx ] [ 0 ] else : lgr . debug ( "Adding row %r to content for first time" , idkey ) nrows = len ( self . _rows ) self . _idkey_to_idx [ idkey ] = nrows self . _idx_to_idkey [ nrows ] = idkey self . _rows . append ( ContentRow ( row , kwds = { "style" : style } ) ) line , adjusted = self . fields . render ( row , style ) lgr . log ( 9 , "Rendered line as %r" , line ) if called_before and adjusted : return str ( self ) , "repaint" if not adjusted and prev_idx is not None : return line , prev_idx + self . fields . has_header return line , "append"
short_docstring: Modify the content.
short_docstring_tokens: Modify the content .
comment: """Modify the content.
  
          Parameters
          ----------
          row : dict
              A normalized row.  If the names specified by `self.ids` have
              already been seen in a previous call, the entry for the previous
              row is updated.  Otherwise, a new entry is appended.
  
          style :
              Passed to `StyleFields.render`.
  
          Returns
          -------
          A tuple of (content, status), where status is 'append', an integer, or
          'repaint'.
  
            * append: the only change in the content is the addition of a line,
              and the returned content will consist of just this line.
  
            * an integer, N: the Nth line of the output needs to be update, and
              the returned content will consist of just this line.
  
            * repaint: all lines need to be updated, and the returned content
              will consist of all the lines.
          """$SEP$# Replace the passed-in row since it may not have all the columns.