这段Python Kivy代码使用多重继承。我得到了上面提到的错误。我希望我的InfoPage类继承所有FloatLayout函数和初始化,并希望它从ConnectPage类继承get_email函数。我该怎么处理呢
class ConnectPage(FloatLayout):
def __init__(self, **kwargs):
super(ConnectPage, self).__init__(**kwargs)
----some code ----
def get_email(self):
return email
class InfoPage(FloatLayout, ConnectPage):
def __init__(self, **kwargs):
super(InfoPage, self).__init__(**kwargs)
---- some code ----
def get_peers(self):
peers = db.common_choices(self.get_email())
return peers
目前没有回答
相关问题 更多 >
编程相关推荐