If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.
Python still doesn't have;
* public/private/protected access modifiers.
* Class interfaces, abstract classes, etc
It's by design - it will never have those.
You can actually do public/private and abstract classes if you want; however you can also chose to fuck it if you want.
As a developer, this is why I love Python. It doesn't assume I'm a baby.
Personally I don't like Python that much, but you can't say it's different than any of these so called "real" OOP languages with respect to private methods. You can call private methods in PHP, Java and C# via reflection. Works like a charm
Prefixing method names with underscore isn't OOP and doesn't make it private.
It is just you pretending that it is private.
You presumably use Linux. Making things private should make your blood boil. Python has an "We're all adults here" philosophy just like Linux (and probably why so many of its users develop on Linux). It's not "pretending" that it is private. That is a convention in Python that indicates private. If a user chooses to ignore documentation or needs to get at the variable anyway, they've been warned and are responsible for what happens next. That's the Linux way, the Python way, and arguably the one true free way.
Python doesn't force things on people. Someone once said that some languages put up barbed wire and land mines to prevent developers from doing certain bad things. Python employs rainbows and sunshine on the good path instead so users are never tempted to go down the bad paths.
The real solution is to create super-private attributes prefixed with three underscores, and have __getattribute__() terminate the program and format the user's hard drive if they try to access them directly. That'll show 'em.
If that graph defines "popular" as "what I like to use most" then I think it is probably true. If it is popular as in "most used" I would doubt that the sampling was done in a very good way.
That said, I use Python for everything if possible. I very seldom have to look for another tool.