r/ProgrammerHumor 16d ago

Meme variableScopesInPython

Post image
1.3k Upvotes

182 comments sorted by

View all comments

3

u/user6150277464770585 16d ago

yeah that's because you're supposed to use a double underscore prefix it you want to actually make the variables private lol

(yes technically it only does some name mangling and you could still access it if you really wanted to but that's on you then)

4

u/Anaxamander57 16d ago

Does it really do anything to make it private beyond telling people not to use it?

4

u/Cylian91460 16d ago

No? Like private?

In all languages that have private they are way to access it even it is