python_super注意事项
class room:
def __init__(self,area=120,usedfor='sleep'):
self.area = area
self.usedfor = usedfor
def display(self):
print("this is my house") class babyroom(room):
def __init__(self,area=40,usedfor="son",wallcolor='green'):
super().__init__(area,usedfor)
self.wallcolr = wallcolor
def display(self):
super().display()
print("babyroom area:%s wallcollor:%s"%(self.area,self.wallcolr)) class rent:
def __init__(self,money=1000):
self.rentmoney = money
def display(self):
print("for rent at the price of %s"%self.rentmoney) class agent(babyroom,rent):
#class agent(rent,babyroom):
def display(self):
super().display()
print("rent house agent")
agent().dispaly() output: class agent(babyroom,rent)类输出为:
this is my house
babyroom area:green wallcollor
rent house agent
class agent(rent,babyroom)类输出:
for rent at the price of 1000
rent house agent
python_super注意事项的更多相关文章
- jQuery UI resizable使用注意事项、实时等比例拉伸及你不知道的技巧
这篇文章总结的是我在使用resizable插件的过程中,遇到的问题及变通应用的奇思妙想. 一.resizable使用注意事项 以下是我在jsfiddle上写的测试demo:http://jsfiddl ...
- Windows Server 2012 NIC Teaming介绍及注意事项
Windows Server 2012 NIC Teaming介绍及注意事项 转载自:http://www.it165.net/os/html/201303/4799.html Windows Ser ...
- TODO:Golang指针使用注意事项
TODO:Golang指针使用注意事项 先来看简单的例子1: 输出: 1 1 例子2: 输出: 1 3 例子1是使用值传递,Add方法不会做任何改变:例子2是使用指针传递,会改变地址,从而改变地址. ...
- app开发外包注意事项,2017最新资讯
我们见过很多创业者,栽在这app外包上.很多创业者对于app外包这件事情不是特别重视,以为将事情交给app外包公司就完事了,实际上不是的.无论是从选择app外包公司还是签订合同.售后维护等各方面都有许 ...
- favicon.ioc使用以及注意事项
1.效果 2.使用引入方法 2.1 注意事项:(把图标命名为favicon.ico,并且放在根目录下,同时使用Link标签,多重保险) 浏览器默认使用根目录下的favicon.ico 图标(如果你并没 ...
- ORACLE分区表梳理系列(二)- 分区表日常维护及注意事项(红字需要留意)
版权声明:本文发布于http://www.cnblogs.com/yumiko/,版权由Yumiko_sunny所有,欢迎转载.转载时,请在文章明显位置注明原文链接.若在未经作者同意的情况下,将本文内 ...
- 【原】Masonry+UIScrollView的使用注意事项
[原]Masonry+UIScrollView的使用注意事项 本文转载请注明出处 —— polobymulberry-博客园 1.问题描述 我想实现的使用在一个UIScrollView依次添加三个UI ...
- 《连载 | 物联网框架ServerSuperIO教程》- 5.轮询通讯模式开发及注意事项。附:网友制作的类库说明(CHM)
1.C#跨平台物联网通讯框架ServerSuperIO(SSIO)介绍 <连载 | 物联网框架ServerSuperIO教程>1.4种通讯模式机制. <连载 | 物联网框架Serve ...
- 《连载 | 物联网框架ServerSuperIO教程》- 6.并发通讯模式开发及注意事项
1.C#跨平台物联网通讯框架ServerSuperIO(SSIO)介绍 <连载 | 物联网框架ServerSuperIO教程>1.4种通讯模式机制. <连载 | 物联网框架Serve ...
随机推荐
- SQL GROUP BY对多个字段进行分组
参考链接:http://stackoverflow.com/questions/2421388/using-group-by-on-multiple-columns 在平时的开发任务中我们经常会用到M ...
- python摸爬滚打之day03----基本数据类型(int,str,bool)
1.数据类型转换 字符串 ----> bool print( bool("hello") ) -----> True 数字----> bool print( b ...
- 使用Git,如何忽略不需要上传的文件(配置文件)
步骤1:在目录下,选择GIt Bash Here 2.输入命令 : git update-index --assume-unchanged 文件名 3.再输入指令 git status 查看修改文件 ...
- C# 解构
我们以前用ref或者out在一定程度上可以解决方法只有一个返回值的问题.在C#7.0中新增了一个新元组(ValueTuple),他可以让我们返回多个值.话不多说,先上代码: 我们可以看到可以用隐式推断 ...
- ext.js的mvc
1.Ext.js的mvc开发模式 在ext.js4.0以后引入mvc开发模式,将js分成model-view-controller三层,使得大量js代码变得更加易于维护和重用,这就是ext.jsmvc ...
- 教你一步步composer安装Magento2.3
以前外贸建站一直用zencart,这段时间ytkah比较有时间,就决定用magento来创建一下站点.magento不像普通的程序一样下载就可以直接安装,需要借助composer安装,还没没compo ...
- [转]如何快速转载CSDN中的博客
原文:https://blog.csdn.net/bolu1234/article/details/51867099 前言 对于喜欢逛CSDN的人来说,看别人的博客确实能够对自己有不小的提高,有时 ...
- 116A
#include <stdio.h> int main() { int n; int a1,a2; int min=0; int cap=0; scanf("%d",& ...
- node代码打包为 exe文件---端口进程关闭demo
最近用到 java,用tomcat起的服务,经常服务关了,对应的进程还在跑,导致再次启动服务失败,需要手动关闭进程. 使用 dos命令虽然只有两行,总是输,也很烦. netstat -ano | fi ...
- js计算斐波拉切
function feibo(a){ if(!a || a <= 0){ throw new Error("参数错误,必须大于0"); }else if(a == 1){ r ...