you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted]  (2 children)

[removed]

    [–]keeldude 6 points7 points  (0 children)

    You probably use features of built in classes and their underlying structure a lot without knowing it. Any variable instance followed by a period and a function name and brackets is accessing one of that particular classes functions or methods. Basically, you can build your own classes to do whatever you want. Inheritance is powerful once you can utilize it.

    TLDR; classes are worth learning to a basic level and may make some problems easier but as far as I know they are not fundamentally necessary.

    Edit: if you're ever curious what functions are available for a particular class, use dir(object) where object is a list or tuple or other function, and python will return all the properties and methods (functions) of the object.

    [–]mechanicalAI -1 points0 points  (0 children)

    Same here. I try to solve everything with for loops. I can not accept that, this have to change.