def _set_bin_width_slider_label(self): if self.number_of_bins < len(self.binnings): text = reduce(lambda s, rep: s.replace(*rep), short_time_units.items(), self.binnings[self.number_of_bins].width_label) else: text = "" self.bin_width_label.setText(text)
def _short_text(label): return reduce(lambda s, rep: s.replace(*rep), short_time_units.items(), label)