title: tkinter - managing multiple tags
body: <p>So, the the tkinter text editor!<br>
  The editor obviously needs to have text styles, which need to change typed text to whatever formatting is currently selected, using tags. But the problem is that the tag name needs to change when the formatting changes, otherwise the tag would be applied to the whole text.
  (This was a problem that I was struggling to identify for quite some time)<br>
  To avoid this, you would need a LOT of tags (like <code>bold, both, calibri</code> etc), so the code would look like this  </p>
  
  <pre><code>if style == 'bold':
      tag_add('bold', 'insert -1c', 'insert')
      tag_configure('bold', font=('Calibri', 12, 'bold'))
  
  if stlye == 'italic':
      etc etc
  </code></pre>
  
  <p>This is awful code, and makes different fonts/sizes impossible.<br>
  Is there a correct way of organising multiple tags like this, something like  </p>
  
  <pre><code>tag.add(currentstyle, 'insert -1c', 'insert')
  tag.config(currentstyle, font=(currentfont, currentsize, currentweight, currentslant))
  </code></pre>
  
  <p>Thanks for your help  </p>
  
  <p><strong>UPDATE</strong><br>
  solved with no small amount of help from Bryan  </p>
  
  <pre><code>tagname = '{}-{}-{}-{}'.format(font, fontsize, weight, slant)
  
  textbox.tag_add(tagname, 'insert -1c', 'insert')
  textbox.tag_configure(tagname, font=(font, fontsize, weight, slant))
  </code></pre>
  
  <p>now every tag has a unique name</p>