Terry J. Reedy <tjre...@udel.edu> added the comment:

IDLE uses tkinter extensively and runs fine on 3.0 to the upcoming 3.9.  Events 
remain Events and event.type, event.widget, event.x, and so on continue to work 
as appropriate for the event type.  As far as I know, the only directly 
tkinter-related changes were the import names for tkinter and its subpackages.

The same has been true for countless other tkinter users. So until you or 
someone can produce a short example that only imports tkinter and definitely 
not anything outside of the stdlib, I (and I think 'we') will assume that the 
problem is with your code or one of the modules you import or possibly a 
system-specific bad compilation of tcl/tk/_tkinter.c or mangled tkinter.py.

Some notes to maybe help:
1. When reporting an exception, one should nearly always paste the complete 
traceback.

2. The first post-import statement in tboplayer.py monkey-patches tkinter with
  tk.CallWrapper = ExceptionCatcher
where ExceptionCatcher must be a class from one of the 3rd party * imports.

To see if one of the 3rd party modules is replacing tk.Event when imported, put 
'print(Event)' after 'from tkinter import *'.  You should see "<class 
'tkinter.Event'>".  If not, move the import and debug print up.  If so, put 
debug prints down in your code.

3. Passing non-Events (like False) as the event argument, especially when this 
unusually possibility is not documented.  A common idiom would be
    def select_track(event=None):
        ...
        if event is not None: ...
A reader should be able to assume that any non-None event is really an event.

Python-list, which I read, would be one good place for any further discussion.

----------
nosy: +terry.reedy -gpolo
resolution:  -> third party
stage:  -> resolved
status: open -> closed
title: Tkinter widget events are of type Tuple -> Tkinter widget events become 
tuples

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue40011>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to