[issue32839] Add after_info as a function to tkinter
Terry J. Reedy
report at bugs.python.org
Tue Feb 13 17:45:06 EST 2018
Terry J. Reedy <tjreedy at udel.edu> added the comment:
I am in favor of exposing all of tk where it makes sense to do so, and I think it does here.
After 'translating' the tk after_info entry into tkinter-ese, I would expect and want that
root.after_info(root.after(f, 100000))[0] is f
be true. the same as would be true of the tcl equivalent. (This could even be a test.) It appears that the current patch instead returns a (python) reference to the tcl wrapper of f. The fact that python callbacks get wrapped as tcl callbacks is currently transparent to tkinter users and should remain so.
Serhiy, I presume that this is what you were uncertain about. I am presuming above that f can be recovered.
Returning the function kind as 'timer' or 'idle' is fine. In other contexts, an enumeration would be a possibility, but this does not seem to fit tkinter.
I presume a bad id results in TclError. Do other tkinter functions allow TclError to propagate? My impression is no. If so, it should be replaced here in a way consistent with other tkinter practice.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32839>
_______________________________________
More information about the Python-bugs-list
mailing list