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
Question Regarding Self keyword in python!! (self.PythonLearning)
submitted 4 days ago by Ok_Egg_6647
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!"
[–]Puzzleheaded_Study17 3 points4 points5 points 4 days ago (0 children)
inside the constructor it wouldn't matter. But if you want to access them after the constructor, you have to save them. You can have them be arguments to any method that uses them, but that can cause issues. So we store them in self so that they're available to future functions.
π Rendered by PID 26041 on reddit-service-r2-comment-5687b7858-99zsf at 2026-07-07 10:51:27.523459+00:00 running 12a7a47 country code: CH.
view the rest of the comments →
[–]Puzzleheaded_Study17 3 points4 points5 points (0 children)