会员
周边
众包
新闻
博问
闪存
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
点滴听滴答
Powered by
博客园
博客园
|
首页
|
新随笔
|
联系
|
订阅
|
管理
2018年12月29日
python多重继承
摘要: #-*-coding:utf-8-*-'''多重继承'''class MyFather: def __init__(self): self.eyes = '爸爸的眼睛是双眼皮' print(self.eyes)class MyMother: def __init__(self): self.fore
阅读全文
posted @ 2018-12-29 14:44 点滴听滴答
阅读(137)
评论(0)
推荐(0)
编辑
python模拟抽象类
摘要: #-*-coding:utf-8-*-'''模拟抽象类通过NotImplementedError类来模拟抽象类,使其在实例化是抛出异常'''def abstract(): raise NotImplementedError('abstract')class Person: def __init__(
阅读全文
posted @ 2018-12-29 14:43 点滴听滴答
阅读(185)
评论(0)
推荐(0)
编辑