Can't import classes Python
这是我的密码
1 2 3 4 5 | class Game_Events(Setup, Game_Setup): def __init__(self): super(Game_Events, self).__init__() super(Game_Events, self).game_setup(self.map_filename) |
但是当导入类时,我得到:
1 2 3 | TypeError: Error when calling the metaclass bases Cannot create a consistent method resolution order (MRO) for bases Game_Setup, Setup |
号
这是EDOCX1的初始值〔0〕:
1 2 3 4 5 | class Setup(object): def __init__(self): self.HERO_MOVE_SPEED = 20 # pixels per second self.MAP_FILENAME = 'resources/tmx/Fesnoria Town.tmx' self.MUSIC_FILENAME ="resources/music/Forest_Song.mp3" |
这是EDOCX1的初始值(1):
1 2 3 | class Game_Setup(Setup): def __init__(self): super(Game_Setup, self).__init__() |
。
我需要先导入
有人知道怎么修理这个吗?