• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
 






点滴听滴答

 
 

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 点滴听滴答 阅读(140) 评论(0) 推荐(0)
 
python模拟抽象类
摘要: #-*-coding:utf-8-*-'''模拟抽象类通过NotImplementedError类来模拟抽象类,使其在实例化是抛出异常'''def abstract(): raise NotImplementedError('abstract')class Person: def __init__( 阅读全文
posted @ 2018-12-29 14:43 点滴听滴答 阅读(188) 评论(0) 推荐(0)