求助!无法import自己定义的类
#Death.py
from random import randint class Death(object):
def __init__(self):
self.quips = [ "You died. You kinda suck at this.",
"Your mom would be proud. If she were smarter.",
"Such a luser.",
"I have a small puppy that's better at this." ]
def death(self):
print (self.quips[randint(0,len(self.quips)-1)]) exit(1)
#game.py
form Death import death #这里显示death未定义是什么原因啊?
death()