本文整理汇总了Python中Person.Person.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python Person.__init__方法的具体用法?Python Person.__init__怎么用?Python Person.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Person.Person
的用法示例。
在下文中一共展示了Person.__init__方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from Person import Person [as 别名]
# 或者: from Person.Person import __init__ [as 别名]
def __init__(self, studentID, name = "Student X", gender = "m", leavingCertificate = 700):
self.studentID = studentID
Person.__init__(self, name, gender)
self.modules = []
self.moduleEnrollments = {}
self.semester = 1
self.leavingCertificate = leavingCertificate #TODO: check Irish system
self.faculty = ""
示例2: __init__
# 需要导入模块: from Person import Person [as 别名]
# 或者: from Person.Person import __init__ [as 别名]
def __init__(self):
Person.__init__(self, '', '', '')
BaseWidget.__init__(self,'Person window')
self.parent = None
#Definition of the forms fields
self._firstnameField = ControlText('First name')
self._middlenameField = ControlText('Middle name')
self._lastnameField = ControlText('Lastname name')
self._fullnameField = ControlText('Full name')
self._buttonField = ControlButton('Press this button')
#Define the button action
self._buttonField.value = self.buttonAction
self._formset = ['_firstnameField', '_middlenameField', '_lastnameField',
'_fullnameField',
(' ','_buttonField', ' '), ' ']
示例3: __init__
# 需要导入模块: from Person import Person [as 别名]
# 或者: from Person.Person import __init__ [as 别名]
def __init__(self, person_id, prefix, first_name, last_name, nick_name, thai_first_name, thai_last_name, birth_date,
nationality, shirt_size, photo_path, email, kmitl_id, academic_year, department, faculty, password):
Person.__init__(self, person_id, prefix, first_name, last_name, nick_name, thai_first_name,
thai_last_name, birth_date, nationality, shirt_size, photo_path, email)
self.kmitl_id = kmitl_id
self.person_id = person_id
self.academic_year = academic_year
self.department = department
self.faculty = faculty
self.password = password
# class Student(Person):
# def __init__(self, stu_id=123, firstName = None, lastName = None, nickName = None, prefix = None,
# gender = None, thaiFirst = None, thaiLast = None, photo = None, role = None, shirtSize = None , birth_d = None):
#
# Person.__init__(self, firstName, lastName, nickName, prefix, gender, thaiFirst, thaiLast, photo, role, shirtSize, birth_d)
#
# self.studentID = stu_id
#
# def printInfo(self):
# return "In student:", self.studentID , Person.printInfo(self)
#
#
# print(Student("560900xx", "Thitiwat", "Wata").printInfo())
示例4: __init__
# 需要导入模块: from Person import Person [as 别名]
# 或者: from Person.Person import __init__ [as 别名]
def __init__(self, classSchedule=None, **kwargs):
Person.__init__(self, **kwargs)
if classSchedule is None:
self.classSchedule = Schedule()
else:
self.classSchedule = classSchedule
示例5: __init__
# 需要导入模块: from Person import Person [as 别名]
# 或者: from Person.Person import __init__ [as 别名]
def __init__(self,name,age):
Person.__init__(self,name)
self.age=age
示例6: __init__
# 需要导入模块: from Person import Person [as 别名]
# 或者: from Person.Person import __init__ [as 别名]
def __init__(self, teachingSchedule=None, **kwargs):
Person.__init__(self, **kwargs)
if teachingSchedule is None:
self.teachingSchedule = Schedule()
else:
self.teachingSchedule = teachingSchedule
示例7: __init__
# 需要导入模块: from Person import Person [as 别名]
# 或者: from Person.Person import __init__ [as 别名]
def __init__(self):
Person.__init__(self)
示例8: __init__
# 需要导入模块: from Person import Person [as 别名]
# 或者: from Person.Person import __init__ [as 别名]
def __init__(self, name="", age=21, major="undeclared", gpa=0.0):
Person.__init__(self, name, age) # call super constr
self.setMajor(major)
self.setGPA(gpa)
示例9: __init__
# 需要导入模块: from Person import Person [as 别名]
# 或者: from Person.Person import __init__ [as 别名]
def __init__(self, name, cash=3000):
Person.__init__(self)
self.name = name
self.cash = cash
self.bet = 0
self.doubled_down = False
示例10: __init__
# 需要导入模块: from Person import Person [as 别名]
# 或者: from Person.Person import __init__ [as 别名]
def __init__(self,nn,vn,mn):
Person.__init__(self,nn,vn)
self.setMatrikelnummer(mn)