title: Error when binding and unbinding keystrokes in Tkinter
body: <p>I was just adding features to my notepad in Tkinter when this happened. I added a bulleted list button which functions just like any other bulleted list you would see in a notepad. This is my code for the bulleted list:</p>
  <pre><code>def bulletList():
      bullet = &quot;  •  &quot;
  
      global bulleted
      if bulleted == True:
          bulleted = False
          entry.unbind(&quot;&lt;Return&gt;&quot;,bulletList())
      elif bulleted == False:
          bulleted = True
          entry.insert(END,f&quot;{bullet}&quot;)
          entry.bind(&quot;&lt;Return&gt;&quot;,bulletList())
  </code></pre>
  <p>For context, <code>bulleted</code> is set to <code>False</code> by default, when the button is not clicked yet. But when it is, I call this function. Apparently though, there was a bug in this function, making it loop infinitely and resulting in a max recursion depth error. Sorry I couldn't attach the error, but it just alternates between the bind and unbind function until the max recursion depth is met.</p>
  <p>Hopefully a solution to this error can be found! Again, I am a beginner to TKinter, so I don't know how to solve this even if it might be common. Thanks!</p>