Py&禅

博客园 首页 新随笔 联系 订阅 管理

2010年6月5日 #

摘要: Problem:如题Solution:一个简单的工厂类方法:import stringdef translator(frm='', to='', delete='', keep=None) if len(to)=1: to = to * len(frm) trans = string.maketrans(frm, to) if keep is not None: allchars = string... 阅读全文
posted @ 2010-06-05 11:33 Py&禅 阅读(262) 评论(0) 推荐(0)