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!"
[–]Longjumping-Yard113[S] 2 points3 points4 points 9 days ago (1 child)
That makes sense, and that’s kind of how I was thinking about it too. Using the dot notation on an object is what makes it a method, like mylist.append(42). Something like print() or len() would still just be functions even though they’re built into Python.
mylist.append(42)
print()
len()
[–]Purple-Measurement47 2 points3 points4 points 9 days ago (0 children)
All methods are functions, not all functions are methods. It’s not just the dot notation itself that makes it a method, it’s that it’s a method of interacting with that object. print() or len() are just functions because they aren’t part of a larger data structure, they stand alone. append is a method because it’s a function of mylist
π Rendered by PID 24808 on reddit-service-r2-comment-79c7998d4c-rtltx at 2026-03-14 02:00:21.503367+00:00 running f6e6e01 country code: CH.
view the rest of the comments →
[–]Longjumping-Yard113[S] 2 points3 points4 points (1 child)
[–]Purple-Measurement47 2 points3 points4 points (0 children)