7
super () löst "TypeError: muss type sein, nicht classobj" für eine Klasse neuen Stils aus
Die folgende Verwendung von super()löst einen TypeError aus: Warum? >>> from HTMLParser import HTMLParser >>> class TextParser(HTMLParser): ... def __init__(self): ... super(TextParser, self).__init__() ... self.all_data = [] ... >>> TextParser() (...) TypeError: must be type, not classobj Bei StackOverflow gibt es eine ähnliche Frage: Python super () löst TypeError aus …