1
lianghui 2014 年 12 月 2 日 __len__ 方法
|
2
aheadlead 2014 年 12 月 2 日 1L正解...
|
3
staticor 2014 年 12 月 2 日 可参考http://stackoverflow.com/questions/2481421/difference-between-len-and-len 或者定义一个类后改写一下 __len__ 方法
|
4
joshryo 2014 年 12 月 2 日 len函数会去调用类的__len__方法,所以想要能用len函数,你定义类的时候都得写__len__方法
|