Hi all, suppose I need to import a module inside a class and that I need to use it in to different methods. Is this is the way to do it?
class test(): import time def method1(self): print 'method 1: ', time.clock() def method2(self): print 'method 2: ', time.clock() If I only need the module in one method should I then place it inside that method or keep it outside? class test(): def method1(self): import time print 'method 1: ', time.clock() def method2(self): print 'method 2: ' thanks, Robert
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor