Re: [Tutor] self.attribute and import attribute

2010-04-23 Thread Steven D'Aprano
On Sat, 24 Apr 2010 12:27:12 pm Joson wrote: > Hi all, > I have a problem about variables efficiency. 99% of the time, you waste more of your time than you save by worrying about tiny efficiencies. Saving 1 minute in a program that runs for 3 minutes is worthwhile. Saving 0.0002 seconds in a pro

[Tutor] self.attribute and import attribute

2010-04-23 Thread Joson
Hi all, I have a problem about variables efficiency. As below, I import f from config.py, Then f is appended to app1.py global variables. In class App, there're two ways to use this variable. One is "self.file =f", then use self.file; the other is using "f" directory. Which way is high efficient?