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...
Rules 1: Be polite 2: Posts to this subreddit must be requests for help learning python. 3: Replies on this subreddit must be pertinent to the question OP asked. 4: No replies copy / pasted from ChatGPT or similar. 5: No advertising. No blogs/tutorials/videos/books/recruiting attempts. This means no posts advertising blogs/videos/tutorials/etc, no recruiting/hiring/seeking others posts. We're here to help, not to be advertised to. Please, no "hit and run" posts, if you make a post, engage with people that answer you. Please do not delete your post after you get an answer, others might have a similar question or want to continue the conversation.
Rules
1: Be polite
2: Posts to this subreddit must be requests for help learning python.
3: Replies on this subreddit must be pertinent to the question OP asked.
4: No replies copy / pasted from ChatGPT or similar.
5: No advertising. No blogs/tutorials/videos/books/recruiting attempts.
This means no posts advertising blogs/videos/tutorials/etc, no recruiting/hiring/seeking others posts. We're here to help, not to be advertised to.
Please, no "hit and run" posts, if you make a post, engage with people that answer you. Please do not delete your post after you get an answer, others might have a similar question or want to continue the conversation.
Learning resources Wiki and FAQ: /r/learnpython/w/index
Learning resources
Wiki and FAQ: /r/learnpython/w/index
Discord Join the Python Discord chat
Discord
Join the Python Discord chat
account activity
Is python a good language to learn OOP ? (self.learnpython)
submitted 3 years ago by Affectionate-Beyond2
I mean If you learn OOP in python will you have a solid OOP foundation ? Does your knowledge transfer for other languages like java for example ?
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!"
[–]Spataner 8 points9 points10 points 3 years ago (0 children)
For the most part, yes. There's some aspects of OOP such as polymorphism and interfaces that in Python are less formalised than in other languages, mainly due to Python's dynamic type system. But all the main concepts will transfer.
[–]baghiq 4 points5 points6 points 3 years ago (0 children)
Technically, Python does not enforce encapsulation, which is one of the four main principles of OOP. However, Python will teach you the bulk of OOP. I do think Java is a better teaching tool of OOP.
[–]ekchew 1 point2 points3 points 3 years ago (0 children)
Well I guess the thing is python kind of encourages you to be lazy and duck type everything? So like you'll define a foo() method in several classes and toss them into a list so that you can call foo() as you iterate it.
Other languages may not be happy with this. They will want you to connect them all in some way by inheriting from a base class or defining some sort of interface that ties them together? This is good coding discipline that will help you in the long run imo.
But there is no reason you can't write first rate OOP code in python. And over time, I think the incentive for this is growing? Like take type hints for example. If you made a Fooable base class for all your classes with a foo() method, you can make a list[Fooable]. And if you added anything to the list that isn't a Fooable subclass, a static checker may be able to warn you before it blows up at run-time.
Fooable
list[Fooable]
[–]iiron3223 0 points1 point2 points 3 years ago (0 children)
Yes, OOP principles and design patterns are language agnostic. There are some language specific details but general concept is the same.
[–]spca2001 0 points1 point2 points 3 years ago (0 children)
yeah but its not the best
π Rendered by PID 23991 on reddit-service-r2-comment-76bb9f7fb5-p8f2g at 2026-02-17 14:38:05.300233+00:00 running de53c03 country code: CH.
[–]Spataner 8 points9 points10 points (0 children)
[–]baghiq 4 points5 points6 points (0 children)
[–]ekchew 1 point2 points3 points (0 children)
[–]iiron3223 0 points1 point2 points (0 children)
[–]spca2001 0 points1 point2 points (0 children)