2013-03-25 2 views

답변

0

를 호출하고 어떻게되는지 :

class test3(object): 
     def func3(self): 
      while True: 
       print "working!!" 

t3 = test3() 

또는 확인 func3staticmethod :

class test3(object): 
    @staticmethod 
    def func3(): 
     while True: 
      print "working!!" 

TypeError: unbound method func3() must be called with test3 instance as first argument (got nothing instead) 

당신은 func3 인스턴스 메서드를 만들고 클래스를 초기화해야 하나

관련 문제