7
super () gera "TypeError: deve ser do tipo, não classobj" para a classe de novo estilo
O seguinte uso de super()gera um TypeError: por quê? >>> from HTMLParser import HTMLParser >>> class TextParser(HTMLParser): ... def __init__(self): ... super(TextParser, self).__init__() ... self.all_data = [] ... >>> TextParser() (...) TypeError: must be type, not classobj Há uma pergunta semelhante no StackOverflow: Python super () gera TypeError , onde …