[issue28498] tk busy command

klappnase report at bugs.python.org
Sun Oct 23 16:01:31 EDT 2016


klappnase added the comment:

"Also it's more efficient to use this than the function _flaten() in that situation:
   
   if not self._w in cmd:
      cmd = (self._w,) + cmd
"

The construct with _flatten() was not my invention, it's probably something to discuss with Guido ;)
The advantage of _flatten() may be, that it will also handle nested tuples properly, though I don't know if there is a real-life situation whee nested tuples might show up there. Anyway, thinking about optimisations on that level seems somewhat pointless to me, no one will probably iterate over configure() calls, and if yes, the bottleneck is clearly the self.tk.call() part.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue28498>
_______________________________________


More information about the Python-bugs-list mailing list