[Tutor] You're gridded for life.

dman dsh8290@rit.edu
Tue, 11 Dec 2001 18:43:36 -0500

On Tue, Dec 11, 2001 at 04:28:44PM +0200, Jean Montambeault wrote:
|     Remember my question about shortcuts to ".grid" ? Maybe not but look at
| this :
| So my question : is the shortcut technique only good for the widgets that
| aren't assigned to a variable ?

It is more general than that.  Every function/method has a return
value of some sort.  If the function/method doesn't explicitly return
something, then it returns 'None' implicitly (so that if it is called
in a compound statement there is a value to use in the rest of the

In the one example, the object was used _only_ to invoke the grid()
method on, and never again.  The grid() method returns None, not the
object it was invoked on.  If you intend to ever use that object
again, you need to create it and grab a handle on it so that you can
use it again.  Thus the call to grid() must be separate from the



(E)ventually (M)alloc()s (A)ll (C)omputer (S)torage