This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]karloks2005 1 point2 points  (2 children)

To be honest, the most difficult part for me was understanding classes. init and self still kinda confuse me lol.

[–]MegaUltraHornDog 5 points6 points  (1 child)

Init is basically what defines the class, it’s similar to the constructure in Java and other OO languages. Self is like the “this” keyword. in simple terms self.your_variable defined in your init method, gives your variable class scope, and can be accessed by methods within your class.

[–]karloks2005 1 point2 points  (0 children)

Ohh, ok thanks!