New submission from Drew French <rectangletan...@gmail.com>: In the <BaseWidget._setup> method, <master> is evaluated as a Boolean (when Tkinter attempts to find a parent for the widget). I think it should really be evaluated against <None>, seeing as that is the default <master> keyword argument value for most widgets. I ran into problems with this when making a container widget class that inherited from the <Canvas>, then implementing the <__len__> magic method. When the length was zero the widget would evaluate as false, which would prevented me from packing widgets inside my container widget.
I attached a revised version of the method. ---------- components: Tkinter files: tkbugfix.py messages: 165070 nosy: Drew.French priority: normal severity: normal status: open title: Minor revision to the <BaseWidget._setup> method in Tkinter type: behavior versions: Python 2.7 Added file: http://bugs.python.org/file26326/tkbugfix.py _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue15303> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com