摘要: 多态:同一个方法由于对象的不同而产生不同的行为。 1.方法有多态,属性没有 2.多态存在的前提:继承和方法重写 阅读全文
posted @ 2019-04-18 20:44 文二1234 阅读(526) 评论(0) 推荐(0)
摘要: #!/usr/bin/env python # -*- coding: utf-8 -*- # author:albert time:2019/4/18 0018 class A: def say(self): print('A') class B(A): def say(self): # A.say(self) s... 阅读全文
posted @ 2019-04-18 20:25 文二1234 阅读(429) 评论(0) 推荐(0)