该篇主要是针对面向对象的细讲,包括类的多重继承,方法的重写,析构函数,回收机制进行讲解

#该类主要是讲述python面象对象的一些特征,包括继承,方法的重写,多态,垃圾回收

class person(object):
    name = ''
    age = ''

def __init__(self,name,age, **kwargs):
        self.name = name
        self.age = age
        return super().__init__(**kwargs)
    
    def dosomething(self):
        print("my name is {0:} and age is {1}".format(self.name,self.age))

#__del__方法为析构函数
    def __del__(self):
      class_name = self.__class__.__name__
      print(class_name, "destroyed")

class Student(person):

bookName = ""

def __init__(self, book, **kwargs):
        self.bookName = book
        return super().__init__(**kwargs)

def dosomething(self):
        print("my name is {0:} and age is {1} and learning {2}".format(self.name,self.age,self.bookName))

class company:

companyName = ""

def __init__(self,company, **kwargs):
        self.companyName = company
        return super().__init__(**kwargs)

def work(self):
        print("I work in {0}".format(self.companyName))

class employee(Student,company):

#def __init__(self, **kwargs):
    #    return super().__init__(**kwargs)
    pass;

if __name__ == "__main__":

per = person(name='Li li',age=25)
    per.dosomething()
    
    student = Student(name="ddd",age=12,book="fdfsd")
    student.dosomething()

jack = employee(name="airvens",age=12,book="computer",company="facebook")
    jack.dosomething()
    jack.work()

#del student回使person调用回收方法
    del per;
    del student;
    del jack;

运行结果:

aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAloAAADUCAIAAADLHBo8AAAXC0lEQVR4nO3dabQUxdnA8fkYjMnrmhhNBARXFHABV+CyiWwCiiYCsqNsctlEUC47yL7vOxdZNILKKkKgAUWJuKORuCYoIIq87zkCxnNy+v1Qc5tmuqu6qrvnzsyd/+/U8fTtqX7qqboz9TDbNXFe5Z6h26+v7vnrq3uJdv41vc6/pvf51/Q+/9rev0m2J35z3RO/Fe36Pv/jtBsKLxCtSuEFVQovrNL3wip9L7yx74U39r3oxn4X3dTvopv6XSxa1f4XV+1/SdX+l1Trf0m1AZdUG3BptQGXVh9wafWBl1Yf+LvqA393s2hP/v6WZLvslkGX3Zpsf7ht0B9ue0q0y2s8dXmNwZfXGHx5zcFX1Bx8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__init__函数中初始化成员时有所不同

3.x 版本中的写法: super().__init__(name, age)

2.x 版本中的写法:super(class,self).__init__(name,age)

python学习之面向对象(下)的更多相关文章

  1. Python学习之==>面向对象编程(二)

    一.类的特殊成员 我们在Python学习之==>面向对象编程(一)中已经介绍过了构造方法和析构方法,构造方法是在实例化时自动执行的方法,而析构方法是在实例被销毁的时候被执行,Python类成员中 ...

  2. Python 学习笔记(下)

    Python 学习笔记(下) 这份笔记是我在系统地学习python时记录的,它不能算是一份完整的参考,但里面大都是我觉得比较重要的地方. 目录 Python 学习笔记(下) 函数设计与使用 形参与实参 ...

  3. Python学习一(面向对象和函数式编程)

    学习了一周的Python,虽然一本书还没看完但是也收获颇多,作为一个老码农竟然想起了曾经荒废好久的园子,写点东西当做是学习笔记吧 对Python的语法看的七七八八了,比较让我关注的还是他编程的思想,那 ...

  4. 从0开始的Python学习014面向对象编程

     简介 到目前为止,我们的编程都是根据数据的函数和语句块来设计的,面向过程的编程.还有一种我们将数据和功能结合起来使用对象的形式,使用它里面的数据和方法这种方法叫做面向对象的编程. 类和对象是面向对象 ...

  5. Python学习-day6 面向对象概念

    开始学习面向对象,可以说之前的学习和编程思路都是面向过程的,从上到下,一步一步走完. 如果说一个简单的需求,用面向过程实现起来相对容易,但是如果在日常生产,面向对象就可以发挥出他的优势了. 程序的可扩 ...

  6. Python学习之面向对象基础

    python的面向对象和以前学的c++,Java都是一般,大同小异,面向对象基础先谈谈类的构造,编写,属性和方法的可见性等等 1.定义类,创建和使用对象 #定义类 class Student(obje ...

  7. Python学习--10 面向对象编程

    面向对象编程--Object Oriented Programming,简称OOP,是一种程序设计思想.OOP把对象作为程序的基本单元,一个对象包含了数据和操作数据的函数. 本节对于面向对象的概念不做 ...

  8. python学习总结(面向对象进阶)

    -------------------类属性和实例属性关系------------------- 1.类属性和实例属性关系     1.实例属性         实例对象独有的属性     2.类属性 ...

  9. python学习 day23 面向对象三大特性之继承

    ### 面向对象三大特性值继承#### 1.什么是继承 继承是一种关系,必须存在两个对象才可能产生这种关系,在现实生活中的继承,王思聪可以继承王健林的财产 被继承的成为父,继承的一方成为子 在程序中, ...

随机推荐

  1. 利用cgroup控制进程使用的资源(cpu、内存等)

    实验环境:centos 6.10 1.安装libcgroup yum install -y libcgroup 2.进入资源控制器默认挂载目录/cgroup [root@hadoop1 cgroup] ...

  2. vue2.0 transition 多个元素嵌套使用过渡

    在做vue的demo的时候遇到一个问题,多个嵌套的元素如何设置transition? 我的代码:代码中元素整体做平移,里面的inner中做旋转,实现一个圆形滚动的效果 <transition n ...

  3. 20145201《Java程序设计》第十周学习总结

    教材学习内容总结 网络编程 网络编程就是在两个或两个以上的设备(例如计算机)之间传输数据. 程序员所作的事情就是把数据发送到指定的位置,或者接收到指定的数据,这个就是狭义的网络编程范畴. 在发送和接收 ...

  4. Spring_HelloWorld

    目录: 各个类文件: pom.xml <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="h ...

  5. 《大型网站系统与JAVA中间件实践》读书笔记-消息中间件

    消息中间件 1.消息中间件的价值 1.1 透过示例看消息中间件对应用的解耦 1.1.1.通过服务调用让其他系统感知事件发生的方式 假设我们要做一个用户登录系统,其中需要支持的一个功能是,用户登录成功 ...

  6. Treflection01_Class对象_构造函数_创建对象

    1. package reflectionZ; import java.lang.reflect.Constructor; import java.util.List; public class Tr ...

  7. GO学习笔记:struct的匿名字段

    我们上面介绍了如何定义一个struct,定义的时候是字段名与其类型一一对应,实际上Go支持只提供类型,而不写字段名的方式,也就是匿名字段,也称为嵌入字段. 当匿名字段是一个struct的时候,那么这个 ...

  8. Confluence 6 配置系统属性

    在这个页面中描述 Confluence 启动时如何设置 Java 属性和其他选项. 请查看 How to fix out of memory errors by increasing availabl ...

  9. flask学习(二):认识web

    url详解: URL是Uniform Resource Locator 的简写,统一资源定位符 一个URL由以下及几部分组成: scheme://host:port/path/?query-strin ...

  10. mysql-in关键字,分组查询,分页查询

    1. in关键字,组查询 # 使用or来查询的化,不方便而且参数一多比较傻 select * from users where id=1 or id=2 or id=4; select * from ...