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 ...
随机推荐
- Excel--数据分列功能
原文:http://www.ittribalwo.com/article/3963.html excel分列功能一:按照固定宽度进行数据拆分 情景: 如下图所示,在日常工作中,我们经常需要根据人员的身 ...
- 2018/05/02 PHP 之错误与异常处理
在学习中,越学习越觉得自己基础薄弱. 在平常工作中,对于某些错误处理感觉不知道怎么下手,于是决定重新再整理一下. 强烈推荐这篇文章,真的感觉学习到了很多. 部分引用::再谈PHP错误与异常处理 -- ...
- disruptor的并行用法
实现EventFactory,在newInstance方法中返回,ringBuffer缓冲区中的对象实例:代码如下: public class DTaskFactory implements Even ...
- webstorm背景颜色更改
一.file --> settings 二.editor-->color scheme 然后右边下拉选择 三.apply -- > ok
- Qt获取QObject对应的类名并把它转为真实类型(使用obj->metaObject()->className() )
QObject是有窗口类的父类,比如QWidget,QLabel,QPushButton等都直接或间接继承自QObject类.如果把某个窗口中的所有控件都装到一个QList<QObject*&g ...
- 使用Jersey上传文件
采用jquery.form.js异步上传图片,并结合<form>表单 <script type="text/javascript"> //采用jquery. ...
- Python3学习之路~5.8 shelve模块
shelve模块是一个简单的k,v将内存数据通过文件持久化的模块,可以持久化任何pickle可支持的python数据格式 import shelve import datetime name = [& ...
- css中根据不同分辨率设置不同样式
@media screen and (max-width: ) { .tab__content{width: %} }
- Spark之数据倾斜 --采样分而治之解决方案
1 采样算法解决数据倾斜的思想 2 采样算法在spark数据倾斜中的具体操作
- 【LeetCode每天一题】Valid Parentheses(有效的括弧)
Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the inpu ...