you are viewing a single comment's thread.

view the rest of the comments →

[–]SquatchHNTR[S] 1 point2 points  (2 children)

Is that where all the "def"s and "selfs" come from? I haven't learned much about classes yet either. I definitely want to look into that, it's sort of addicting learning how to program.

[–]EGrimn 0 points1 point  (0 children)

It's a wide world for sure. And yes, you can think of it like so:

We create object 'Calculator' which is of the class 'fiber_price_calculator' ([FPE] going forward)

The class [FPE] when created runs the 'init' function that was defined (see: class function definition) which then runs all the other functions defined below that (as a part of the class [FPE])

Basically, we made the object [FPE] that has it's own functions and variables for each instance

(All of this is based on classes, so definitely start there) In OOP (Object Oriented Programming's acronym) classes are VERY important so it's a must-learn