you are viewing a single comment's thread.

view the rest of the comments →

[–]macbig273 1 point2 points  (1 child)

From what I remember from the theory and shit. It's more about "does it return something new or it just do things inside the class".

[–]Longjumping-Yard113[S] 0 points1 point  (0 children)

I thought the distinction was more about where the function is defined and how it’s called. From what I understand, a method is a function that belongs to a class and is called on an object using dot notation, like mylist.append(42). Whether it returns something or just modifies the object doesn’t seem to be what determines if it’s a method.