super(LastUpdateOrderDict, self).__init__()是什么意思?
来源:互联网 发布:淘宝生意参谋 编辑:程序博客网 时间:2024/06/06 05:08
#!/usr/bin/env python
# -*- coding:utf-8 -*-
class
Person(
object
):
def
__init__(
self
,name,gender,age):
self
.name
=
name
self
.gender
=
gender
self
.age
=
age
class
Student(Person):
def
__init__(
self
,name,gender,age,school,score):
#super(Student,self).__init__(name,gender,age)#
self
.name
=
name.upper()
self
.gender
=
gender.upper()#此处是要将其大写
self
.school
=
school
self
.score
=
score
s
=
Student(
'Alice'
,
'female'
,
18
,
'Middle school'
,
87
)
print
s.school
print
s.name
阅读全文
0 0
- super(LastUpdateOrderDict, self).__init__()是什么意思?
- __init__(self),self,super,继承杂谈
- python self __init__
- self、__doc__、__init__、__name__
- self super
- self super
- Self & Super
- self和__init__的含义 + 为何要有self和__init__
- 【Python】self, __init__(未完)
- Python Class self __init__笔记
- php new self()是什么意思
- self = [super init]
- self = [super init]
- 关键字”self”和”super”
- self and super
- self = [super init]
- self和super 详解
- Object C---super&self
- Ext中Grid所有分页汇总 ——后台操作数据(PageImpl返回数据)
- bzoj 4361: isn 树状数组+动态规划
- 1280 洛谷 尼克的任务
- 排序之插入排序
- MacOS网络配置
- super(LastUpdateOrderDict, self).__init__()是什么意思?
- MY LITTLE GAME | 第一次用Construct2制作html游戏
- 宏定义、内联函数、普通函数的区别
- 1.二维数组-定义 2.二维数组--重点 3.二维数组-遍历
- XMLHttpRequest对象的基本属性:
- 洛谷 1057 传球游戏
- 提升树
- Tomcat项目部署和启动
- 程序化交易与机器学习思路梳理