“In java, we have been taught about public/private/protected variables”
“Why is that not required in python?”
For the same reason it’s not required in Java.
You’re free to use — or not use
As a Python and Java programmer, I’ve found that
protected are very, very important design concepts. But as a practical matter, in tens of thousands of lines of Java and Python, I’ve never actually used
Here’s my question “protected from whom?”
Other programmers on my team? They have the source. What does protected mean when they can change it?
Other programmers on other teams? They work for the same company. They can — with a phone call — get the source.
Clients? It’s work-for-hire programming (generally). The clients (generally) own the code.
So, who — precisely — am I protecting it from?
Right. The schizophrenic sociopath who refused to read the API comment blocks.
Well said!! http://stackoverflow.com/a/1641305/2542750