In python a module private function or variable is named _foo
.
If it is private to a class it is names __foo
,
The mechanics behind how these work are different, however that is of little relevance to the question.
Why, during the design of the Python language was the double underscore characters chosen for class private members? Why not single underscore, like for module private? Why not some other character that is more visible? (Differentiating between _ and __ is hard).
I'm sure there is some history here, but I'm having trouble finding it, because all I find are tutorials telling me what it means, rather than why it is that way.