[issue3638] tkinter.mainloop() is meaningless and crash: remove it

STINNER Victor report at bugs.python.org
Sat Jan 3 15:00:15 CET 2009


STINNER Victor <victor.stinner at haypocalc.com> added the comment:

> Tkapp_Mainloop is supposed to work both as a module function 
> and a method, and it tests for self to find out which
> case it is. Now, this test is apparently broken in 3.x, ...

Ok. In Python 2.x, selfptr is NULL whereas selfptr is a pointer to the 
module in Python 3.x. New attached patch uses PyModule_Check() to 
check if selfptr is the module or an object.

> if that function is removed, the code to support 
> it should also be removed.

Which code? I don't see which code uses _tkinter.mainloop. I saw code 
that calls the method mainloop() of a Tkapp object, like 
tkinter.mainloop() does. Or am I wrong?

Added file: http://bugs.python.org/file12567/_tkinter_mainloop.patch

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


More information about the Python-bugs-list mailing list