Tkinter.event.widget: handler gets name instead of widget.

Rick Johnson rantingrickjohnson at gmail.com
Wed Jul 11 03:06:10 CEST 2012


Also:

Q3: Why are you explicitly setting the name of your "subFrame" widgets
instead of allowing Tkinter to assign a unique name?...AND are you
aware of the conflicts that can arise from such changes[1]?

Q4: Are you aware of the built-in function "enumerate"[2]? I see you
are passing around indexes to iterables AND simultaneously needing the
obj reference itself. I prefer to keep indexing to a minimum.  If
there is no bleeding edge performance issue to worry about (and there
almost *always* never is) why not use enumerate?

[1] http://www.pythonware.com/library/tkinter/introduction/x147-more-on-widget-names.htm
[2] http://docs.python.org/release/3.0.1/library/functions.html#enumerate



More information about the Python-list mailing list