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