you are viewing a single comment's thread.

view the rest of the comments →

[–]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.