Shouldn't Tkinter pack() return self? 
Author Message
 Shouldn't Tkinter pack() return self?

I am working on my first Tkinter application and am pretty new with
python as well. I had seen examples such as:



    btn = Button(...)

I tried

    btn = Button(...).pack(...)

and was for some time puzzled why btn was being set to None. Now I see
that pack() must not be returning a value and the result of the
assignment is None.

Is that Good? Would it be easier to chain methods if each returned self?
I recollect that as a Smalltalk notion, although I never did anything
serious with that language.

Is there a contrary note in the docs? I don't recall...


Fri, 06 Apr 2001 03:00:00 GMT  
 [ 2 post ] 

 Relevant Pages 

1. Shouldn't __init__ return self instead of None? (Was: Re: [Tutor] Why error if method __init__ does not return none)

2. Shouldn't there be an Exit Block Statement in Smalltalk

3. Help! Deleted files I shouldn't have

4. Shouldn't I do so? [copyright law]

5. Shouldn't this be constant space?

6. shouldn't STOP?

7. Mistery: JGE taken while it shouldn't have been

8. Mystery: JGE taken but it shouldn't have happened

9. instead of C++ shouldn't ms have used masm for win95

10. g77 -fno-automatic changes output but shouldn't

11. Why exceptions shouldn't be used for flow control [Re: YAS to the

12. Shouldn't (- - p) = (p) in sicstus prolog?


Powered by phpBB® Forum Software