for template, bits in [
('Set %s.', self.set_bits), ('Clear %s.', self.clear_bits),
('Toggle %s', self.toggle_bits)]:
if bits:
parts.append(template % (bit_glyphs(bits)))
for template, bits in [
('Set %s.', self.set_bits), ('Clear %s.', self.clear_bits),
('Toggle %s', self.toggle_bits)]:
if bits:
parts.append(template % (bit_glyphs(bits)))