import sys
class UniversityPerson:
class Student(UniversityPerson):
def _init_(self, schedule):
答案 0 :(得分:1)
为什么要在Student
内定义您的课程UniversityPerson
?使它们处于同一水平:
class UniversityPerson:
pass
class Student(UniversityPerson):
def __init__(self, schedule): #use double-underscores instead of single ones
pass
答案 1 :(得分:0)
你不必定义它并在调用之前初始化它吗?也许此链接有助于:Python class definition--import statement