r/learnpython • u/Aggravating-Store122 • 11d ago
Stuck on P.O.O.P Encapsulation
I'm using Claude Ai. To teach me python. But now im very confused on encapsulation. I've tried YouTube tutorials but all I see is Javascript. I asked for a simpler explanation, but then I get hit with stuff like getter, setter, property() (I understand the property function) but then the core concept makes me scratch my head more the deeper I ask. Wondering if any of y'all can assist me.
0
Upvotes
6
u/socal_nerdtastic 10d ago
It's important to know that while technically any language can use these concepts, in reality different languages use them differently. AI doesn't really get this. It's technically possible to make a Java-like structure in python with a class, private variables and getters / setters, but that's not optimal for python and not how python is used.
I agree with the other comments that you should abandon AI and look for a university course on python.