Re: [Tutor] questions when define a class

2014-04-15 Thread Peter Otten
Qianyun Guo wrote: > Hi all, I am trying to get a suffix tree from a string. I use three > classes, Node, Edge, SuffixTree. I have two questions when implementing: > > 【1】 > a = Edge(1,2,3,4) > a.length > > 1 > if I remove '@property' in my code, it returns as below: > a = Edg

[Tutor] questions when define a class

2014-04-15 Thread Qianyun Guo
Hi all, I am trying to get a suffix tree from a string. I use three classes, Node, Edge, SuffixTree. I have two questions when implementing: 【1】 >>> a = Edge(1,2,3,4) >>> a.length 1 if I remove '@property' in my code, it returns as below: >>> a = Edge(1,2,3,4) >>> a.length >>> a.length()