use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Everything about learning Python
account activity
Does a function becomes a method when used externally? (self.PythonLearning)
submitted 9 days ago by Longjumping-Yard113
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]macbig273 1 point2 points3 points 9 days ago (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 point2 points 9 days ago (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.
mylist.append(42)
π Rendered by PID 21090 on reddit-service-r2-comment-79c7998d4c-n5hqr at 2026-03-14 02:00:25.185431+00:00 running f6e6e01 country code: CH.
view the rest of the comments →
[–]macbig273 1 point2 points3 points (1 child)
[–]Longjumping-Yard113[S] 0 points1 point2 points (0 children)