摘要:
__getattr__和__setattr__可以用来对属性的设置和取值进行处理,比如下面的例子:[代码]上面的例子中,在赋值书的value属性时,偷偷的将value减去了100,呵。输出结果:Python0Python cost : 0Type is not found!Python 天天美味系列(总)Python 天天美味(24) - 初始化多维数组 Python 天天美味(25) - 深入... 阅读全文
posted @ 2008-05-25 15:39
CoderZh
阅读(6551)
评论(18)
推荐(0)
浙公网安备 33010602011771号