摘要: def delect(): '删除一行信息' # m = www.oldboy2.org while 1 : flag = False m = input('please input which url you want to delect:') with open('haproxy.conf',encoding = 'utf8')... 阅读全文
posted @ 2017-04-23 09:39 柳姑娘 阅读(157) 评论(0) 推荐(0)
摘要: #封装 class A: __x = 1 #_A__x = 1 def __test(self): #_A__test(self) print('from A') print(A._A__x) A._A__test(11111) print(A.__dict__) a = A() print(a._ 阅读全文
posted @ 2017-04-23 09:38 柳姑娘 阅读(178) 评论(0) 推荐(0)
摘要: # 多态:同一事物的多种形态 一个人既是人类,又是动物 #多态性:一种调用方式,不同的执行效果 class Animal: def run(self): print('animal is running') class People(Animal): def run(self): print('人正 阅读全文
posted @ 2017-04-23 09:36 柳姑娘 阅读(160) 评论(0) 推荐(0)
摘要: #新式类的继承,在查找属性时遵循 广度优先 class A(object): def test(self): print('from A') pass class B(A): # def test(self): # print('from B') pass class C(A): # def tes 阅读全文
posted @ 2017-04-23 09:33 柳姑娘 阅读(145) 评论(0) 推荐(0)