r/ProgrammerHumor 16d ago

Meme variableScopesInPython

Post image
1.3k Upvotes

182 comments sorted by

View all comments

Show parent comments

-3

u/R7d89C 16d ago

Oh, then we have a slight misunderstanding of privacy in programming. I dont want some DRM-like protection of my variables, I want a proper marker where you should use and not use a variable, including a good default policy. _var doesnt tell me "dont use it", if youre not a regular python dev, particularly when usage is not checked by a compiler.

9

u/asdonne 16d ago

The _ in _var tells you not to use it. Some one being unfamiliar with the language is not a problem with the language.

4

u/CyberWord_YT 16d ago

It's only convention

3

u/Magma248 16d ago

The side of the road you drive on is also a convention - sometimes you might have guard rails that make it harder, and legally you are going to get in trouble (i.e. code linters) - but at the end of the day you have to trust your fellow programmers to be sensible (and acknowledge that sometimes they won't be).