반응형
Notice
Link
목록오류메시지 (1)
스택큐힙리스트
슈퍼()는 새로운 스타일 클래스에서 "TypeError: must be type, not classobj"를 발생시킵니다.
super()의 다음 사용은 TypeError를 일으킵니다. 왜죠? >>> from HTMLParser import HTMLParser>>> class TextParser(HTMLParser):... def __init__(self):... super(TextParser, self).__init__()... self.all_data = []... >>> TextParser()(...)TypeError: must be type, not classobjStackOverflow에 비슷한 질문이 있습니다: Python super() raises TypeError. 이곳에서는 사용자 클래스가 새로운 스타일 클래스가 아니라는 사실 때문에 오류가 발생한다는 것이 설명되어 있습니다. 그러나 위의 클래스는 object에..
카테고리 없음
2023. 4. 26. 15:32