title: What's the difference between "update" and "update_idletasks"?
body: <p>From the <code>effbot.org</code> documentation, we have the following about the <a href="https://web.archive.org/web/20201105231837id_/http://effbot.org/tkinterbook/widget.htm#Tkinter.Widget.update-method" rel="nofollow noreferrer"><code>update</code></a> function:</p>
  <blockquote>
  <p>Processes all pending events, calls event callbacks, completes any
  pending geometry management, redraws widgets as necessary, and calls
  all pending idle tasks. This method should be used with care, since it
  may lead to really nasty race conditions if called from the wrong
  place (from within an event callback, for example, or from a function
  that can in any way be called from an event callback, etc.). When in
  doubt, use <code>update_idletasks</code> instead.</p>
  </blockquote>
  <p>On the other hand, there's this about the <a href="https://web.archive.org/web/20201105231837id_/http://effbot.org/tkinterbook/widget.htm#Tkinter.Widget.update_idletasks-method" rel="nofollow noreferrer"><code>update_idletasks</code></a> function:</p>
  <blockquote>
  <p>Calls all pending idle tasks, without processing any other events.
  This can be used to carry out geometry management and redraw widgets
  if necessary, without calling any callbacks.</p>
  </blockquote>
  <p>As far as I understood, both <em>call all pending idle tasks</em>, <em>complete any pending geometry management</em> and <em>redraw widgets as necessary</em>. The only difference I see is that <code>update</code> <em>processes all pending events</em> and <em>calls event callbacks</em>. That's why we should not call <code>update</code> from within an even callback, I suppose.</p>
  <p>However, I have seen <a href="https://stackoverflow.com/questions/29158220/tkinter-understanding-mainloop?answertab=active#tab-top">examples</a> where <code>update_idletasks</code> and <code>update</code> are used one after the other, and I can't understand the reason, since theoretically <code>update</code> does everything <code>update_idletasks</code> does.</p>
  <p>What exactly are these <em>pending events</em> and the <em>idle tasks</em> the documentation is talking about? What are the differences and relations?</p>
  <p>That being answered, in what real circumstances should I use <code>update</code> over <code>update_idletasks</code>? Concrete examples are also appreciated.</p>