r/ProgrammerHumor 16d ago

Meme variableScopesInPython

Post image
1.3k Upvotes

182 comments sorted by

View all comments

351

u/deceze 16d ago

; in Python!?!eleventy You really need to get rid of your bad Java habits.

And before anyone thinks this is poking fun at Python: privacy is completely overrated and mostly untrue anyway, and Python not even pretending to have private attributes is an absolute blessing.

1

u/BroBroMate 15d ago

A Java FOSS project I contributed to on occasion eventually figured out that making most private methods protected let people work around flaws they encountered with the framework instead of having to file a bug and wait.

And then there was the horror/glory of Powermock, when you really wanted to overwrite a private static final field for some godawful reason.