当前位置: 首页>>代码示例>>Python>>正文


Python Person.__init__方法代码示例

本文整理汇总了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 = ""
开发者ID:bazilinskyy,项目名称:agent-based-uni,代码行数:10,代码来源:Student.py

示例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', ' '), ' ']
开发者ID:AlfiyaZi,项目名称:pyforms,代码行数:20,代码来源:PersonWindow.py

示例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())
开发者ID:sasawatc,项目名称:Project_connectTo_GitHub,代码行数:43,代码来源:Student.py

示例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
开发者ID:FreakTheMighty,项目名称:pyjamas,代码行数:8,代码来源:Student.py

示例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
开发者ID:b10n1k,项目名称:Python_Workshop,代码行数:5,代码来源:subclass.py

示例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
开发者ID:FreakTheMighty,项目名称:pyjamas,代码行数:8,代码来源:Professor.py

示例7: __init__

# 需要导入模块: from Person import Person [as 别名]
# 或者: from Person.Person import __init__ [as 别名]
	def __init__(self): 
		Person.__init__(self)
开发者ID:SuperChocomocha,项目名称:Blackjack-Simulator,代码行数:4,代码来源:Dealer.py

示例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)
开发者ID:tamle022276,项目名称:python,代码行数:6,代码来源:Student.py

示例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
开发者ID:SuperChocomocha,项目名称:Blackjack-Simulator,代码行数:8,代码来源:Player.py

示例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)
开发者ID:benaryorg-school,项目名称:Laboruebungen_2C,代码行数:5,代码来源:Student.py


注:本文中的Person.Person.__init__方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。