asked
Getting Started with Programming: Introduction to Python (Inflearn Original)
Class(1-2)
Written on
·
210
0
SelfTest.func1()라고 쳐도
unbound method func1() must be called with SelfTest instance as first argument (got nothing instead)
라는 에러메세지가 뜨네요.... 왜 그러는 걸까요?
Answer 1
메소드 호출 시 클래스 직접 호출 또는 인자로 self 내용이 되는 인스턴스를 넘겨줘야 합니다.
강의 내용 예제를 잘 살펴보세요.