7
super ()는 새 스타일 클래스에 대해 "TypeError : classobj가 아니라 type이어야합니다"를 발생시킵니다.
다음을 사용 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 classobj StackOverflow에 비슷한 질문이 있습니다 .Python super ()는 TypeError 를 발생시킵니다. 여기서 오류는 사용자 클래스가 새로운 …