If you have a large project and a dozen people writing different parts. One of those guys creates a class its so none of the other developers can write a function or code that modifies the variable in a way that isn't intended. The class methods are supposed to be the access point to the data.
And the project was developed using an oriented object language in order to let the other members of the team write code that will modifies the variable in a way that isn't initially intended, if they need to. Obviously, whatever the language they should do it by inheritance, not by directly addressing the class, but it's one of the intent and interest of using objects.
It's why private and protected methods exists, in order to limits the possibility of rewriting, keeping private (should not) or even protected (will never) the critical parts of the class. If one broke your class by inadvertently rewriting something he shouldn't, before being his fault it's yours, for not having correctly declared your methods.
And in this regard Python do a good job. It only use convention to declare private and protected methods, but enforce the obfuscating of protected ones. There's still a way to deal with them, but it's dirty and there's no way to not know that you're doing something you really shouldn't.
After, it's like everything, you are a grown man, and you take responsibility for what you do, whatever how dirty it can be. The clean way to do this is by creating a class that will inherit from
function
and extend it to add the method(s)/attribute(s) you'll need. But Python decided to go further and let you do it dynamically for punctual use, through the use of a set of dedicated instructions, in order to keep the code explicit.
That way tom doesn't write some weird code no one knows about that screws with the stear or accelerator because he thinks it would be funny to do so or whatever stupid reason. Stupid shit like actually happens.
There's nothing unknown in Ren'Py code, and even less funny things. The code isn't the most optimized one, but it's efficient and totally explicit. It's not because you don't understand it that it's weird or some stupid shit.
I love using python personally but I do have my doubts about how well it scales to very large projects
Well, Ren'Py is a very large and complex project, that handle three different dedicated languages. It's not as efficient and fast as Unity can be, but it's not its intent, and at its scale it do its job pretty well. There's also
You must be registered to see the links
, a web framework,
You must be registered to see the links
, a neural networks base, and so on.
Modern hardware, specially CPUs, make Python slowness less important nowadays, while the use of Python make the project easier to maintain. It's the advantage of a language designed around human readability, for once the code can effectively be self explanatory. It doesn't mean that choosing Python is some universal solution, but when used by (semi-)professionals, the project will be efficient enough, clean and stable.