Re: [Tutor] class to function

2014-05-25 Thread Danny Yoo
> i am trying to understand this code: > http://nbviewer.ipython.org/gist/BenLangmead/6665861 I'm slightly familiar with the purpose of the code. It's constructing a Suffix Tree, though not in linear time. Reading the code... ah. I see. This is enumerating through all suffixes, and building it

Re: [Tutor] class to function

2014-05-25 Thread Alan Gauld
On 25/05/14 16:39, rahmad akbar wrote: Hi guys i am trying to understand this code: http://nbviewer.ipython.org/gist/BenLangmead/6665861 i understand functions quite alright . but i have no idea about classes yet. Do you understand modules? Modules contain functions and data that you can reus

Re: [Tutor] class to function

2014-05-25 Thread Alex Kleider
On 2014-05-25 09:20, R. Alan Monroe wrote: can you guys help explain. super thanks A class is like a blueprint. An instance of that class is like a house built from that blueprint. Think about it. An infinite number of houses could be constructed using those blueprints. But the architect only

Re: [Tutor] class to function

2014-05-25 Thread R. Alan Monroe
> can you > guys help explain. super thanks A class is like a blueprint. An instance of that class is like a house built from that blueprint. Think about it. An infinite number of houses could be constructed using those blueprints. But the architect only had to draw them once. __init__() is like

[Tutor] class to function

2014-05-25 Thread rahmad akbar
Hi guys i am trying to understand this code: http://nbviewer.ipython.org/gist/BenLangmead/6665861 i understand functions quite alright . but i have no idea about classes yet. the code is written using class and i could not make much sense out of it. all this init and self thingy drive me crazy. c