def _update_table_cache(self):
        """Clears and updates the table cache to be in sync with self"""

        self._table_cache.clear()
        for sel, tab, val in self:
            try:
                self._table_cache[tab].append((sel, val))
            except KeyError:
                self._table_cache[tab] = [(sel, val)]

        assert len(self) == self._len_table_cache()
def _update_table_cache ( self ) : self . _table_cache . clear ( ) for sel , tab , val in self : try : self . _table_cache [ tab ] . append ( ( sel , val ) ) except KeyError : self . _table_cache [ tab ] = [ ( sel , val ) ] assert len ( self ) == self . _len_table_cache ( )
Clears and updates the table cache to be in sync with self