On Tue, 2005-09-08 at 09:10 +0000, [EMAIL PROTECTED] wrote:
>   
> Hi all,
> 
> Is it better to use:
> 
> self.wTree.get_widget("widget").do_something()
> self.wTree.get_widget("widget").do_something_else()
> self.wTree.get_widget("widget").do_something_else_again()
> 
> or
> 
> widget = self.wTree.get_widget("widget")
> widget.do_something()
> widget.do_something_else()
> widget.do_something_else_again()
> 
> Thanks
> 
I use a little common sense about it.  if you rarely need to call it or
use it I do the first rather than tie up more memory and try to track
yet another variable.


On the other hand something that is used more frequently it is much
better to get it once and use it many times.
-- 
Brian <[EMAIL PROTECTED]>

_______________________________________________
pygtk mailing list   [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to