摘要: Python 的 Decorator。主要还是记录自己对Decorator的看法,和一些用法。 阅读全文
posted @ 2014-03-23 22:59 Svin_py 阅读(207) 评论(0) 推荐(0) 编辑
摘要: 这部分主要是自己看到后半部分才想起来记得。主要是记载书中的一些编程概念和技巧。陆陆续续补全上半部分吧。Chapter 12 Tuple: 1)元组的操作中,有DSU(decorate-sort-undecorate)的思想过程。 2)元组是不可变的,但是可以用替换的方法。 eg. t = ('a', 'b') t = ('A') + t[:1] 3)tip: t = list(s) t = ''.join(t) ''' make the list —> string ''' 4 阅读全文
posted @ 2014-03-23 14:59 Svin_py 阅读(759) 评论(0) 推荐(0) 编辑