def column_name(self, data): handle = data[0] cached, name = self.get_cached_value(handle, "NAME") if not cached: name = name_displayer.raw_display_name(data[COLUMN_NAME]) self.set_cached_value(handle, "NAME", name) return name
def column_name(self, data): handle = data[0] cached, name = self.get_cached_value(handle, "NAME") if not cached: name = name_displayer.raw_display_name(data[COLUMN_NAME]) # internally we work with utf-8 for python 2.7 if not isinstance(name, str): name = name.encode('utf-8') self.set_cached_value(handle, "NAME", name) return name
def column_name(self, data): handle = data[0] if handle in self.lru_name: name = self.lru_name[handle] else: name = name_displayer.raw_display_name(data[COLUMN_NAME]) # internally we work with utf-8 for python 2.7 if not isinstance(name, str): name = name.encode('utf-8') if not self._in_build: self.lru_name[handle] = name return name