小编Jos*_*ton的帖子

Python类继承有问题

我正在学习一个Programming类,并且对于其中一个测试,我需要创建一个继承自已创建的类的类.这是老师教我做的代码,但它似乎没有起作用:

class Intern(Employer):
    def __init__(self, last_name, first_name, address, phone, email, end_date):
        Employer(last_name, first_name, address, phone, email)
        self.end_date=end_date
    def intern_info(self):
        self.print_info()
        print self.end_date
Run Code Online (Sandbox Code Playgroud)

python inheritance class

-1
推荐指数
1
解决办法
101
查看次数

标签 统计

class ×1

inheritance ×1

python ×1