Tkinter layout manager methods
Hans-Joachim Widmaier
hjwidmai at foxboro.com
Thu Aug 3 07:55:56 EDT 2000
Hi,
I've already asked this question, but, alas, haven't gotten any reply.
Well, here it is:
Why do the layout manager methods of widgets not return a reference to
the widget?
Example:
b = Button(text="Ok", command=self.ok)
b.pack()
I'd rather write:
b = Button(text="Ok", command=self.ok).pack()
I see no apparent drawback with that. But it's fewer lines (granted,
usually there are several options, prohibiting writing it in a single
line [and then, on my 1600x1200 desktop I can easily have windows
200+ characters wide <not daring to wink>]).
Since python is well thought out, there might be a reason for this.
I just don't see it.
--
Hans-Joachim Widmaier
More information about the Python-list
mailing list