文件名称:python设计模式大全
文件大小:39KB
文件格式:PDF
更新时间:2024-01-13 15:55:13
python python函数 python反射
本文实例讲述了python常见的设计模式。分享给大家供大家参考,具体如下: # #!/usr/bin/env python # # -*- coding:utf-8 # # class HttpBase: # def get(self): # psss # class Http1(HttpBase): # def get(self): # print 'http1' # class Http2(HttpBase): # def get(self): # print 'http2' # # # class Base: # def __init__(sel